This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients barry, eli.bendersky, ethan.furman, josh.r
Date 2018-01-22.07:47:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516607229.39.0.467229070634.issue29752@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-01-22 07:47:09ethan.furmansetrecipients: + ethan.furman, barry, eli.bendersky, josh.r
2018-01-22 07:47:09ethan.furmansetmessageid: <1516607229.39.0.467229070634.issue29752@psf.upfronthosting.co.za>
2018-01-22 07:47:09ethan.furmanlinkissue29752 messages
2018-01-22 07:47:09ethan.furmancreate