Message303027
It turns out that enum34 backports module was the culprit (it was first on search path). When using enum native module, everything works as expected:
> c:\Python\Python36-32\python.exe -I
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import enum
>>> enum
<module 'enum' from 'c:\\Python\\Python36-32\\lib\\enum.py'>
>>> @enum.unique
... class A(enum.IntEnum):
... a = 1
... name = 2
... value = 3
...
>>> exit()
> c:\Python\Python36-32\python.exe
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import enum
>>> enum
<module 'enum' from 'C:\\Python27\\Lib\\site-packages\\enum\\__init__.py'>
>>> @enum.unique
... class A(enum.IntEnum):
... a = 1
... name = 2
... value = 3
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "C:\Python27\Lib\site-packages\enum\__init__.py", line 835, in unique
(enumeration, duplicate_names)
ValueError: duplicate names found in <enum 'A'>: a -> A.name, name -> A.name, value -> A.name
Sorry for the noise. |
|
Date |
User |
Action |
Args |
2017-09-26 09:52:05 | Robert Gomułka | set | recipients:
+ Robert Gomułka, barry, eli.bendersky, ethan.furman |
2017-09-26 09:52:05 | Robert Gomułka | set | messageid: <1506419525.08.0.712223716255.issue31587@psf.upfronthosting.co.za> |
2017-09-26 09:52:05 | Robert Gomułka | link | issue31587 messages |
2017-09-26 09:52:05 | Robert Gomułka | create | |
|