Message248391
This looks to me as very special case. Enum doesn't delegates the __bool__ method as well as it doesn't delegates __float__, __lt__, __len__, etc. It is left to user to add these methods if needed.
It is easy to add the __bool__ method to user enum. In your case you also can inherit from IntEnum.
>>> class Bool(IntEnum):
... Yep = True
... Nope = False
...
>>> bool(Bool.Yep)
True
>>> bool(Bool.Nope)
False |
|
Date |
User |
Action |
Args |
2015-08-11 05:41:15 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, r.david.murray, ethan.furman, novas0x2a |
2015-08-11 05:41:14 | serhiy.storchaka | set | messageid: <1439271675.0.0.731712062228.issue24840@psf.upfronthosting.co.za> |
2015-08-11 05:41:14 | serhiy.storchaka | link | issue24840 messages |
2015-08-11 05:41:14 | serhiy.storchaka | create | |
|