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__
>     enum_item = obj_type.__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 <module>
>     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

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to