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:
Jacob Kaplan-Moss 2009-09-10 22:23:24 +00:00
parent 84ef9dabfa
commit 9d1a7c203c
1 changed files with 2 additions and 1 deletions

View File

@ -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: