[Python-checkins] cpython: Close issue25147: use C implementation of OrderedDict
ethan.furman
python-checkins at python.org
Fri Sep 18 07:04:18 CEST 2015
https://hg.python.org/cpython/rev/b77916d2d7cc
changeset: 98023:b77916d2d7cc
user: Ethan Furman <ethan at stoneleaf.us>
date: Thu Sep 17 22:03:52 2015 -0700
summary:
Close issue25147: use C implementation of OrderedDict
files:
Lib/enum.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Lib/enum.py b/Lib/enum.py
--- 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']
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list