mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Rename copy_reg module to copyreg.
Updated documentation. Merged revisions 63042 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63042 | alexandre.vassalotti | 2008-05-11 04:25:28 -0400 (Sun, 11 May 2008) | 5 lines Added module stub for copy_reg renaming in 3.0. Renamed copy_reg to copyreg in the standard library, to avoid spurious warnings and ease later merging to py3k branch. Public documentation remains intact. ........
This commit is contained in:
parent
7760008c38
commit
f7fa63dd55
20 changed files with 309 additions and 307 deletions
|
@ -1,6 +1,6 @@
|
|||
"""Create portable serialized representations of Python objects.
|
||||
|
||||
See module copy_reg for a mechanism for registering custom picklers.
|
||||
See module copyreg for a mechanism for registering custom picklers.
|
||||
See module pickletools source for extensive comments.
|
||||
|
||||
Classes:
|
||||
|
@ -26,8 +26,8 @@ Misc variables:
|
|||
__version__ = "$Revision$" # Code version
|
||||
|
||||
from types import FunctionType, BuiltinFunctionType
|
||||
from copy_reg import dispatch_table
|
||||
from copy_reg import _extension_registry, _inverted_registry, _extension_cache
|
||||
from copyreg import dispatch_table
|
||||
from copyreg import _extension_registry, _inverted_registry, _extension_cache
|
||||
import marshal
|
||||
import sys
|
||||
import struct
|
||||
|
@ -299,7 +299,7 @@ class Pickler:
|
|||
self.save_global(obj)
|
||||
return
|
||||
|
||||
# Check copy_reg.dispatch_table
|
||||
# Check copyreg.dispatch_table
|
||||
reduce = dispatch_table.get(t)
|
||||
if reduce:
|
||||
rv = reduce(obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue