[Python-3000-checkins] r53942 - python/branches/p3yk/Lib/pickletools.py
guido.van.rossum
python-3000-checkins at python.org
Mon Feb 26 16:59:56 CET 2007
Author: guido.van.rossum
Date: Mon Feb 26 16:59:50 2007
New Revision: 53942
Modified:
python/branches/p3yk/Lib/pickletools.py
Log:
Change a test to be more predictable.
The problem with using random.random is that several modules and tests do
"from random in random" which confuses pickle.whichmodule().
Modified: python/branches/p3yk/Lib/pickletools.py
==============================================================================
--- python/branches/p3yk/Lib/pickletools.py (original)
+++ python/branches/p3yk/Lib/pickletools.py Mon Feb 26 16:59:50 2007
@@ -2050,10 +2050,10 @@
Exercise the INST/OBJ/BUILD family.
>>> import random
->>> dis(pickle.dumps(random.random, 0))
- 0: c GLOBAL 'random random'
- 15: p PUT 0
- 18: . STOP
+>>> dis(pickle.dumps(random.getrandbits, 0))
+ 0: c GLOBAL 'random getrandbits'
+ 20: p PUT 0
+ 23: . STOP
highest protocol among opcodes = 0
>>> from pickletools import _Example
More information about the Python-3000-checkins
mailing list