Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit c33355d86aaf96faba44febb02395d8d12c9cd5b 1 parent 9d1a7c2
Jacob Kaplan-Moss authored September 10, 2009

Showing 1 changed file with 1 addition and 2 deletions. Show diff stats Hide diff stats

  1. 3  django/utils/datastructures.py
3  django/utils/datastructures.py
@@ -117,8 +117,7 @@ def iterkeys(self):
117 117
         return iter(self.keyOrder)
118 118
 
119 119
     def values(self):
120  
-        super_get = super(SortedDict, self).__getitem__
121  
-        return [super_get(k) for k in self.keyOrder]
  120
+        return map(super(SortedDict, self).__getitem__, self.keyOrder)
122 121
 
123 122
     def itervalues(self):
124 123
         for key in self.keyOrder:

0 notes on commit c33355d

Please sign in to comment.
Something went wrong with that request. Please try again.