[Python-Dev] Enum: subclassing? (original) (raw)
Georg Brandl g.brandl at gmx.net
Wed May 1 23:53:30 CEST 2013
- Previous message: [Python-Dev] Enum: subclassing?
- Next message: [Python-Dev] Enum: subclassing?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 01.05.2013 23:44, schrieb Georg Brandl:
Traceback (most recent call last): File "/home/gbr/devel/ref435/ref435.py", line 84, in new enumitem = objtype.new(result, value) TypeError: object.new(SIPStatusCode) is not safe, use int.new()
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "ex.py", line 11, in class SIPStatusCode(IETFStatusCode, int, Enum): File "/home/gbr/devel/ref435/ref435.py", line 86, in new raise EnumError(*exc.args) from None TypeError: exception causes must derive from BaseException
To be fair the secondary exception is an artifact of me trying the example with Python 3.2, which doesn't have "from None".
Georg
- Previous message: [Python-Dev] Enum: subclassing?
- Next message: [Python-Dev] Enum: subclassing?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]