From e5754ab0c4ab44cd1e7e5484ce07e640964387dd Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 17 Sep 2015 22:03:52 -0700 Subject: Close issue25147: use C implementation of OrderedDict --- Lib/enum.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Lib/enum.py b/Lib/enum.py index 616b2ea..6284b9b 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'] -- cgit v0.12