[Python-checkins] r73489 - python/trunk/Lib/test/test_generators.py

benjamin.peterson python-checkins at python.org
Sat Jun 20 00:21:12 CEST 2009


Author: benjamin.peterson
Date: Sat Jun 20 00:21:12 2009
New Revision: 73489

Log:
use closures

Modified:
   python/trunk/Lib/test/test_generators.py

Modified: python/trunk/Lib/test/test_generators.py
==============================================================================
--- python/trunk/Lib/test/test_generators.py	(original)
+++ python/trunk/Lib/test/test_generators.py	Sat Jun 20 00:21:12 2009
@@ -964,7 +964,7 @@
 
     values = [None] * len(gs)
 
-    def gen(i, values=values):
+    def gen(i):
         if i >= len(gs):
             yield values
         else:
@@ -989,7 +989,7 @@
     # Do one loop nest at time recursively, until the # of loop nests
     # remaining is divisible by 3.
 
-    def gen(i, values=values):
+    def gen(i):
         if i >= n:
             yield values
 
@@ -1007,7 +1007,7 @@
     # remain.  Don't call directly:  this is an internal optimization for
     # gen's use.
 
-    def _gen3(i, values=values):
+    def _gen3(i):
         assert i < n and (n-i) % 3 == 0
         ip1, ip2, ip3 = i+1, i+2, i+3
         g, g1, g2 = gs[i : ip3]


More information about the Python-checkins mailing list