Author ethan.furman
Recipients barry, eli.bendersky, ethan.furman
Date 2020-09-15.02:12:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org>
In-reply-to
Content
If an Enum declares __str__, __repr__, __format__, or __reduce_ex__ to be object`s, then it will get replaced by the base Enum's corresponding method.  E.g.:

  class RegexFlag(IntFlag):

     IGNORECASE = I = 2

     def repr(self):
         return 're.%s' % self.name

     __str__ = object.__str__

The intent of the above is have str(RegexFlag.I) == repr(RegexFlag.I) (with some quotes, of course), but currently RegexFlag.__str__ will be replaced with Flag.__str__.
History
Date User Action Args
2020-09-15 02:12:45ethan.furmansetrecipients: + ethan.furman, barry, eli.bendersky
2020-09-15 02:12:45ethan.furmansetmessageid: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org>
2020-09-15 02:12:45ethan.furmanlinkissue41789 messages
2020-09-15 02:12:45ethan.furmancreate