[docs] [issue19040] Problems with overriding Enum.__new__
report at bugs.python.org
Mon Sep 23 06:04:07 CEST 2013
Ethan Furman added the comment:
Yup, just trying to add some explanation on how it currently works.
Drekin, I'm sure you've already figured this out, but for those who may read this in the future: what you need is a helper function:
"could also be OptionalEnum(enum, value)"
return SomeEnum(value) # or return enum(value)
Python tracker <report at bugs.python.org>
More information about the docs