diff options
author | Raymond Hettinger <python@rcn.com> | 2007-12-13 23:52:59 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2007-12-13 23:52:59 +0000 |
commit | bc288e8bbde31f9255cdd5dcbfde287b0f0ec33a (patch) | |
tree | b753752e4855a25a3f7d3e024c1569776e03e3b7 /Lib/collections.py | |
parent | 04a9a0e904d31875bc7bbcbe0899076194d3cb6f (diff) | |
download | cpython-git-bc288e8bbde31f9255cdd5dcbfde287b0f0ec33a.tar.gz |
Small speedup
Diffstat (limited to 'Lib/collections.py')
-rw-r--r-- | Lib/collections.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/collections.py b/Lib/collections.py index 0b0a26bb46..abe8e0cc68 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -2,6 +2,7 @@ __all__ = ['deque', 'defaultdict', 'namedtuple'] from _collections import deque, defaultdict from operator import itemgetter as _itemgetter +from itertools import izip as _izip from keyword import iskeyword as _iskeyword import sys as _sys @@ -77,7 +78,7 @@ def namedtuple(typename, field_names, verbose=False): print template # Execute the template string in a temporary namespace - namespace = dict(itemgetter=_itemgetter) + namespace = dict(itemgetter=_itemgetter, zip=_izip) try: exec template in namespace except SyntaxError, e: |