summaryrefslogtreecommitdiff
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2015-09-17 22:03:52 -0700
committerEthan Furman <ethan@stoneleaf.us>2015-09-17 22:03:52 -0700
commit6c4c7964cb8671a9aadf025b154ec637d5c358f2 (patch)
treee0ab9a3def7cba1ca46e6acc193ad212cd28a1ad /Lib/enum.py
parentb437f937dcddac9b8790beefab5ccc60d2c6584c (diff)
downloadcpython-6c4c7964cb8671a9aadf025b154ec637d5c358f2.tar.gz
Close issue25147: use C implementation of OrderedDict
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 616b2eac15..6284b9bb7e 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -1,7 +1,12 @@
import sys
-from collections import OrderedDict
from types import MappingProxyType, DynamicClassAttribute
+try:
+ from _collections import OrderedDict
+except ImportError:
+ from collections import OrderedDict
+
+
__all__ = ['Enum', 'IntEnum', 'unique']