summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2014-10-14 15:59:14 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2014-10-14 15:59:14 (GMT)
commit987f3dd161c4390d5e458298b93f73fdb984ad6c (patch)
treef5dac844e62e32cf70afbb2b4c549d12c2f08c45 /Lib/enum.py
parent395c73436e279f53930ce66d682600d327f4e3c8 (diff)
parent0ae550bdde7cc87defb89dd19c912bf4485619f5 (diff)
downloadcpython-987f3dd161c4390d5e458298b93f73fdb984ad6c.zip
cpython-987f3dd161c4390d5e458298b93f73fdb984ad6c.tar.gz
cpython-987f3dd161c4390d5e458298b93f73fdb984ad6c.tar.bz2
Issue22506: merge from 3.4
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index b9e42ae..bbf8632 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -464,7 +464,12 @@ class Enum(metaclass=EnumMeta):
return "%s.%s" % (self.__class__.__name__, self._name_)
def __dir__(self):
- added_behavior = [m for m in self.__class__.__dict__ if m[0] != '_']
+ added_behavior = [
+ m
+ for cls in self.__class__.mro()
+ for m in cls.__dict__
+ if m[0] != '_'
+ ]
return (['__class__', '__doc__', '__module__', 'name', 'value'] +
added_behavior)