From 68526fe258da8c01196fd7cf48e8e5f1280bf8fd Mon Sep 17 00:00:00 2001 From: Angelin BOOZ <9497359+lem2clide@users.noreply.github.com> Date: Mon, 21 Sep 2020 15:11:06 +0200 Subject: bpo-40084: Enum - dir() includes member attributes (GH-19219) --- Lib/enum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/enum.py') diff --git a/Lib/enum.py b/Lib/enum.py index 3c459ea411..e8603a4342 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -644,7 +644,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): -- cgit v1.2.1