From: Ethan Furman Date: Fri, 18 Sep 2015 05:03:52 +0000 (-0700) Subject: Close issue25147: use C implementation of OrderedDict X-Git-Tag: v3.6.0a1~1536 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5754ab0c4ab44cd1e7e5484ce07e640964387dd;p=python Close issue25147: use C implementation of OrderedDict --- 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']