mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
add handler for JPython's org.python.core.PyStringMap object, which
walks and quacks like a dictionary.
This commit is contained in:
parent
f638d1c9dd
commit
2b9d029308
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue