Message310401
I'm not convinced this piece needs to be in the stdlib. Unlike other bits that need extensive metaclass support this is trivial to add:
class DerivedEnumMeta(EnumMeta):
def __getitem__(cls, name):
try:
return cls._member_map_[name]
except KeyError:
result = cls._missing_name_(name)
if isinstance(result, cls):
return result
raise |
|
Date |
User |
Action |
Args |
2018-01-22 07:47:09 | ethan.furman | set | recipients:
+ ethan.furman, barry, eli.bendersky, josh.r |
2018-01-22 07:47:09 | ethan.furman | set | messageid: <1516607229.39.0.467229070634.issue29752@psf.upfronthosting.co.za> |
2018-01-22 07:47:09 | ethan.furman | link | issue29752 messages |
2018-01-22 07:47:09 | ethan.furman | create | |
|