mirror of https://github.com/django/django.git
Micro-optomization to SortedDict.values(). Yes, it looks silly, but it shaves 30 seconds (5%) off the run time of the test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
84ef9dabfa
commit
9d1a7c203c
|
@ -117,7 +117,8 @@ class SortedDict(dict):
|
|||
return iter(self.keyOrder)
|
||||
|
||||
def values(self):
|
||||
return [super(SortedDict, self).__getitem__(k) for k in self.keyOrder]
|
||||
super_get = super(SortedDict, self).__getitem__
|
||||
return [super_get(k) for k in self.keyOrder]
|
||||
|
||||
def itervalues(self):
|
||||
for key in self.keyOrder:
|
||||
|
|
Loading…
Reference in New Issue