[docs] [issue19040] Problems with overriding Enum.__new__
report at bugs.python.org
Mon Sep 23 03:40:35 CEST 2013
Ethan Furman added the comment:
How about this note after the AutoNumber example?
The :meth:`__new__` method, if defined, is used during creation of the Enum
members; it is then replaced by Enum's :meth:`__new__` which is used after
class creation for lookup of existing members. Due to the way Enums are
supposed to behave, there is no way to customize Enum's :meth:`__new__`.
nosy: +barry, eli.bendersky
stage: -> patch review
Python tracker <report at bugs.python.org>
More information about the docs