Message250904
_collections exists because it contains C implementations of some collections classes or helpers. _collections itself is imported only in collections and threading. And in threading the same idiom as proposed by Eric is used:
try:
from _collections import deque as _deque
except ImportError:
from collections import deque as _deque
What is the cost of importing OrderedDict at all? Ethan, can you provide any measurement results? |
|
Date |
User |
Action |
Args |
2015-09-17 17:44:00 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, rhettinger, vstinner, r.david.murray, eli.bendersky, ethan.furman, eric.snow |
2015-09-17 17:44:00 | serhiy.storchaka | set | messageid: <1442511840.06.0.732841037464.issue25147@psf.upfronthosting.co.za> |
2015-09-17 17:43:59 | serhiy.storchaka | link | issue25147 messages |
2015-09-17 17:43:59 | serhiy.storchaka | create | |
|