ValueError instead of TypeError
This commit is contained in:
parent
ec85633fa4
commit
af9a392e94
|
@ -299,7 +299,7 @@ You may not define two enumeration values with the same integer value::
|
||||||
... butters = 4
|
... butters = 4
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
TypeError: Multiple enum values: 3
|
ValueError: Multiple enum values: 3
|
||||||
|
|
||||||
You also may not duplicate values in derived enumerations::
|
You also may not duplicate values in derived enumerations::
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ You also may not duplicate values in derived enumerations::
|
||||||
... chartreuse = 2 # Oops!
|
... chartreuse = 2 # Oops!
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
TypeError: Multiple enum values: 2
|
ValueError: Multiple enum values: 2
|
||||||
|
|
||||||
|
|
||||||
Enumeration values
|
Enumeration values
|
||||||
|
|
Loading…
Reference in New Issue