summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>1998-05-27 22:38:22 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>1998-05-27 22:38:22 (GMT)
commit2b9d029308212b5a197120df5ad38128438bb604 (patch)
tree564edeb2b0030535d0ef0afbc34132d7529fdad0 /Lib/pickle.py
parentf638d1c9ddf4ca2434f6ae9b3ad59754720d4cd6 (diff)
downloadcpython-2b9d029308212b5a197120df5ad38128438bb604.zip
cpython-2b9d029308212b5a197120df5ad38128438bb604.tar.gz
cpython-2b9d029308212b5a197120df5ad38128438bb604.tar.bz2
add handler for JPython's org.python.core.PyStringMap object, which
walks and quacks like a dictionary.
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index bf73599..0fde828 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -38,6 +38,11 @@ mloads = marshal.loads
PicklingError = "pickle.PicklingError"
UnpicklingError = "pickle.UnpicklingError"
+try:
+ from org.python.core import PyStringMap
+except ImportError:
+ PyStringMap = None
+
MARK = '('
STOP = '.'
POP = '0'
@@ -363,6 +368,8 @@ class Pickler:
write(SETITEMS)
dispatch[DictionaryType] = save_dict
+ if not PyStringMap is None:
+ dispatch[PyStringMap] = save_dict
def save_inst(self, object):
d = id(object)