diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-12-08 19:52:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 19:52:58 (GMT) |
commit | cbfcc67170d459bcf3e9d63d2f44eadec740bf69 (patch) | |
tree | adade1990f5a32741e8f203f77b18306b7bee348 /Lib/enum.py | |
parent | b947b305a6833cc059214d5bdd2065edd65024c4 (diff) | |
download | cpython-cbfcc67170d459bcf3e9d63d2f44eadec740bf69.zip cpython-cbfcc67170d459bcf3e9d63d2f44eadec740bf69.tar.gz cpython-cbfcc67170d459bcf3e9d63d2f44eadec740bf69.tar.bz2 |
bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497) (GH-23704)
(cherry picked from commit 37440eef7f9a0c27e13fc9ce0850574bb00688b0)
Diffstat (limited to 'Lib/enum.py')
-rw-r--r-- | Lib/enum.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py index da809e2..da0657f 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -663,7 +663,7 @@ class Enum(metaclass=EnumMeta): # the value # pure Enum branch, or branch with __str__ explicitly overridden - str_overridden = type(self).__str__ != Enum.__str__ + str_overridden = type(self).__str__ not in (Enum.__str__, Flag.__str__) if self._member_type_ is object or str_overridden: cls = str val = str(self) |