mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix some problems introduced by the str8 repr change.
This commit is contained in:
parent
a092947d26
commit
aa588c4699
3 changed files with 9 additions and 2 deletions
|
@ -501,7 +501,8 @@ class Pickler:
|
|||
else:
|
||||
self.write(BINSTRING + pack("<i", n) + bytes(obj))
|
||||
else:
|
||||
self.write(STRING + bytes(repr(obj)) + b'\n')
|
||||
# Strip leading 's' due to repr() of str8() returning s'...'
|
||||
self.write(STRING + bytes(repr(obj).lstrip("s")) + b'\n')
|
||||
self.memoize(obj)
|
||||
dispatch[str8] = save_string
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue