[Python-checkins] peps: Better error messages on duplicate enum values
eli.bendersky
python-checkins at python.org
Wed Apr 10 05:32:45 CEST 2013
http://hg.python.org/peps/rev/07e369037b19
changeset: 4843:07e369037b19
user: Eli Bendersky <eliben at gmail.com>
date: Tue Apr 09 20:32:13 2013 -0700
summary:
Better error messages on duplicate enum values
files:
pep-0435.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pep-0435.txt b/pep-0435.txt
--- a/pep-0435.txt
+++ b/pep-0435.txt
@@ -300,7 +300,7 @@
... 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 @@
... chartreuse = 2 # Oops!
Traceback (most recent call last):
...
- ValueError: Multiple enum values: 2
+ ValueError: Conflicting enums with value '2': 'green' and 'chartreuse'
Enumeration values
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list