summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index c28f345..ac89d6b 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -1,8 +1,14 @@
import sys
-from collections import OrderedDict
from types import MappingProxyType, DynamicClassAttribute
-__all__ = ['Enum', 'IntEnum', 'unique']
+# try _collections first to reduce startup cost
+try:
+ from _collections import OrderedDict
+except ImportError:
+ from collections import OrderedDict
+
+
+__all__ = ['EnumMeta', 'Enum', 'IntEnum', 'unique']
def _is_descriptor(obj):