[Python-checkins] python/dist/src/Lib pickletools.py,1.1,1.2
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
2003年1月27日 11:01:53 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv19776/python/Lib
Modified Files:
pickletools.py
Log Message:
stringnl_noescape_pair(): changed the reader to separate the two
component strings by a blank instead of a period. Guido pointed
out that the component strings (at least the first one) can be
dotted already. find_class() is overridable too, so only God knows
all the possibilities that make sense to someone.
Index: pickletools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pickletools.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pickletools.py 27 Jan 2003 18:51:47 -0000 1.1
--- pickletools.py 27 Jan 2003 19:01:47 -0000 1.2
***************
*** 300,307 ****
>>> import StringIO
>>> read_stringnl_noescape_pair(StringIO.StringIO("Queue\\nEmpty\\njunk"))
! 'Queue.Empty'
"""
! return "%s.%s" % (read_stringnl_noescape(f), read_stringnl_noescape(f))
stringnl_noescape_pair = ArgumentDescriptor(
--- 300,307 ----
>>> import StringIO
>>> read_stringnl_noescape_pair(StringIO.StringIO("Queue\\nEmpty\\njunk"))
! 'Queue Empty'
"""
! return "%s %s" % (read_stringnl_noescape(f), read_stringnl_noescape(f))
stringnl_noescape_pair = ArgumentDescriptor(
***************
*** 315,319 ****
consist solely of printable ASCII characters.
The pair is returned as a single string, with
! a single '.' separating the two strings.
""")
--- 315,319 ----
consist solely of printable ASCII characters.
The pair is returned as a single string, with
! a single blank separating the two strings.
""")
***************
*** 1669,1673 ****
>>> import random
>>> dis(pickle.dumps(random.random))
! 0: c GLOBAL 'random.random'
15: p PUT 0
18: . STOP
--- 1669,1673 ----
>>> import random
>>> dis(pickle.dumps(random.random))
! 0: c GLOBAL 'random random'
15: p PUT 0
18: . STOP
***************
*** 1679,1683 ****
2: p PUT 0
5: ( MARK
! 6: i INST 'pickle.PicklingError' (MARK at 5)
28: p PUT 1
31: ( MARK
--- 1679,1683 ----
2: p PUT 0
5: ( MARK
! 6: i INST 'pickle PicklingError' (MARK at 5)
28: p PUT 1
31: ( MARK
***************
*** 1701,1705 ****
3: ( MARK
4: ( MARK
! 5: c GLOBAL 'pickle.PicklingError'
27: q BINPUT 1
29: o OBJ (MARK at 4)
--- 1701,1705 ----
3: ( MARK
4: ( MARK
! 5: c GLOBAL 'pickle PicklingError'
27: q BINPUT 1
29: o OBJ (MARK at 4)