Ethan Furman <et...@stoneleaf.us> added the comment: 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 ---------- resolution: -> rejected stage: test needed -> resolved status: open -> closed versions: -Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29752> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com