[Python-3000-checkins] r58879 - python/branches/py3k-pep3137/Lib/test/pickletester.py

guido.van.rossum python-3000-checkins at python.org
Tue Nov 6 15:22:33 CET 2007


Author: guido.van.rossum
Date: Tue Nov  6 15:22:33 2007
New Revision: 58879

Modified:
   python/branches/py3k-pep3137/Lib/test/pickletester.py
Log:
Make the main loop in the main program a little more practical.


Modified: python/branches/py3k-pep3137/Lib/test/pickletester.py
==============================================================================
--- python/branches/py3k-pep3137/Lib/test/pickletester.py	(original)
+++ python/branches/py3k-pep3137/Lib/test/pickletester.py	Tue Nov  6 15:22:33 2007
@@ -1007,8 +1007,8 @@
     # Print some stuff that can be used to rewrite DATA{0,1,2}
     from pickletools import dis
     x = create_data()
-    pickles = [pickle.dumps(x, 0), pickle.dumps(x, 1), pickle.dumps(x, 2)]
-    for i, p in enumerate(pickles):
+    for i in range(3):
+        p = pickle.dumps(x, i)
         print("DATA{0} = (".format(i))
         for j in range(0, len(p), 20):
             b = bytes(p[j:j+20])


More information about the Python-3000-checkins mailing list