add handler for JPython's org.python.core.PyStringMap object, which

walks and quacks like a dictionary.
This commit is contained in:
Jeremy Hylton 1998-05-27 22:38:22 +00:00
parent f638d1c9dd
commit 2b9d029308
1 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,11 @@ mloads = marshal.loads
PicklingError = "pickle.PicklingError" PicklingError = "pickle.PicklingError"
UnpicklingError = "pickle.UnpicklingError" UnpicklingError = "pickle.UnpicklingError"
try:
from org.python.core import PyStringMap
except ImportError:
PyStringMap = None
MARK = '(' MARK = '('
STOP = '.' STOP = '.'
POP = '0' POP = '0'
@ -363,6 +368,8 @@ class Pickler:
write(SETITEMS) write(SETITEMS)
dispatch[DictionaryType] = save_dict dispatch[DictionaryType] = save_dict
if not PyStringMap is None:
dispatch[PyStringMap] = save_dict
def save_inst(self, object): def save_inst(self, object):
d = id(object) d = id(object)