Better error messages on duplicate enum values
This commit is contained in:
parent
cf59fc15f8
commit
abebe41b7b
|
@ -300,7 +300,7 @@ You may not define two enumeration values with the same integer value::
|
|||
... butters = 4
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
ValueError: Multiple enum values: 3
|
||||
ValueError: Conflicting enums with value '3': 'kenny' and 'kyle'
|
||||
|
||||
You also may not duplicate values in derived enumerations::
|
||||
|
||||
|
@ -309,7 +309,7 @@ You also may not duplicate values in derived enumerations::
|
|||
... chartreuse = 2 # Oops!
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
ValueError: Multiple enum values: 2
|
||||
ValueError: Conflicting enums with value '2': 'green' and 'chartreuse'
|
||||
|
||||
|
||||
Enumeration values
|
||||
|
|
Loading…
Reference in New Issue