Author: jacob
Date: 2009-09-10 17:49:05 -0500 (Thu, 10 Sep 2009)
New Revision: 11495
Modified:
django/trunk/django/utils/datastructures.py
Log:
As long as we're micro-optomizing, do it right -- using map() shaves another
dozen or so seconds off the test suite run time.
Modified: django/trunk/django/utils/datastructures.py
===================================================================
--- django/trunk/django/utils/datastructures.py 2009-09-10 22:23:24 UTC (rev
11494)
+++ django/trunk/django/utils/datastructures.py 2009-09-10 22:49:05 UTC (rev
11495)
@@ -117,8 +117,7 @@
return iter(self.keyOrder)
def values(self):
- super_get = super(SortedDict, self).__getitem__
- return [super_get(k) for k in self.keyOrder]
+ return map(super(SortedDict, self).__getitem__, self.keyOrder)
def itervalues(self):
for key in self.keyOrder:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---