As long as we're micro-optomizing, do it right -- using map() shaves another dozen or so seconds off the test suite run time.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9d1a7c203c
commit
c33355d86a
|
@ -117,8 +117,7 @@ class SortedDict(dict):
|
||||||
return iter(self.keyOrder)
|
return iter(self.keyOrder)
|
||||||
|
|
||||||
def values(self):
|
def values(self):
|
||||||
super_get = super(SortedDict, self).__getitem__
|
return map(super(SortedDict, self).__getitem__, self.keyOrder)
|
||||||
return [super_get(k) for k in self.keyOrder]
|
|
||||||
|
|
||||||
def itervalues(self):
|
def itervalues(self):
|
||||||
for key in self.keyOrder:
|
for key in self.keyOrder:
|
||||||
|
|
Loading…
Reference in New Issue