AttributeError: 'Item' object has no attribute 'enum'
Bug #524259 reported by
Markus Korn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.enum |
Fix Released
|
Low
|
Ian Booth |
Bug Description
I got this error when running lp:lazr.enum
>>> from enum import Item
>>> Item('a') == Item('b')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/TEST/
self.enum == other.enum)
AttributeError: 'Item' object has no attribute 'enum'
>>>
Related branches
lp:~wallyworld/lazr.enum/json-serialisation-support
- Curtis Hovey (community): Approve (code)
-
Diff: 591 lines (+360/-67)9 files modified.bzrignore (+2/-0)
_bootstrap/bootstrap.py (+229/-46)
ez_setup.py (+1/-1)
src/lazr/enum/NEWS.txt (+7/-0)
src/lazr/enum/README.txt (+34/-0)
src/lazr/enum/__init__.py (+3/-0)
src/lazr/enum/_enum.py (+29/-19)
src/lazr/enum/_json.py (+54/-0)
src/lazr/enum/version.txt (+1/-1)
Changed in lazr.enum: | |
status: | Triaged → In Progress |
assignee: | nobody → Ian Booth (wallyworld) |
Changed in lazr.enum: | |
milestone: | none → 1.1.4 |
To post a comment you must log in.
Items only test equal if they belong to the same EnumeratedType.
I guess we could either raise a different error saying that the Item isn't part of an enumerated type, or we could just always say that they are not equal. I'm not sure I necessarily agree with either.