]> granicus.if.org Git - python/commitdiff
Close issue25147: use C implementation of OrderedDict
authorEthan Furman <ethan@stoneleaf.us>
Fri, 18 Sep 2015 05:03:52 +0000 (22:03 -0700)
committerEthan Furman <ethan@stoneleaf.us>
Fri, 18 Sep 2015 05:03:52 +0000 (22:03 -0700)
Lib/enum.py

index 616b2eac15094c3615d60753cf1f4a0dedd3a1a3..6284b9bb7eb0090773d6ed1f5ba7aaf38a6edd16 100644 (file)
@@ -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']