summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-12-14 22:43:43 (GMT)
committerGitHub <noreply@github.com>2020-12-14 22:43:43 (GMT)
commit33cbb04986d0dabb9c542edc52bb4ea6106d3a81 (patch)
tree05c1054839b07b835f57da2d6a984aa85273d716 /Lib/enum.py
parentdbb00062dc3afb12c41c87564e6faefe60766b01 (diff)
downloadcpython-33cbb04986d0dabb9c542edc52bb4ea6106d3a81.zip
cpython-33cbb04986d0dabb9c542edc52bb4ea6106d3a81.tar.gz
cpython-33cbb04986d0dabb9c542edc52bb4ea6106d3a81.tar.bz2
bpo-40084: Enum - dir() includes member attributes (GH-19219)
(cherry picked from commit 68526fe258da8c01196fd7cf48e8e5f1280bf8fd) Co-authored-by: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com>
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index b14da08..35210c9 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -699,7 +699,7 @@ class Enum(metaclass=EnumMeta):
for cls in self.__class__.mro()
for m in cls.__dict__
if m[0] != '_' and m not in self._member_map_
- ]
+ ] + [m for m in self.__dict__ if m[0] != '_']
return (['__class__', '__doc__', '__module__'] + added_behavior)
def __format__(self, format_spec):