Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8480eab1
Commit
8480eab1
authored
Jan 28, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments.
parent
dbef5e8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Lib/pickle.py
Lib/pickle.py
+9
-1
No files found.
Lib/pickle.py
View file @
8480eab1
...
@@ -561,7 +561,7 @@ class Pickler:
...
@@ -561,7 +561,7 @@ class Pickler:
# This method does not use memoize() so that it can handle
# This method does not use memoize() so that it can handle
# the special case for non-binary mode.
# the special case for non-binary mode.
# XXX What did that comment mean? That is, what "special case for
# XXX What did that comment mean? That is, what "special case for
# XXX non-binary mode? It sure *looks* like nothing special is
# XXX non-binary mode
"
? It sure *looks* like nothing special is
# XXX happening in the INST case.
# XXX happening in the INST case.
memo_len
=
len
(
memo
)
memo_len
=
len
(
memo
)
if
self
.
bin
:
if
self
.
bin
:
...
@@ -699,6 +699,14 @@ class Unpickler:
...
@@ -699,6 +699,14 @@ class Unpickler:
except
_Stop
,
stopinst
:
except
_Stop
,
stopinst
:
return
stopinst
.
value
return
stopinst
.
value
# Return largest index k such that self.stack[k] is self.mark.
# If the stack doesn't contain a mark, eventually raises IndexError.
# This could be sped by maintaining another stack, of indices at which
# the mark appears. For that matter, the latter stack would suffice,
# and we wouldn't need to push mark objects on self.stack at all.
# Doing so is probably a good thing, though, since if the pickle is
# corrupt (or hostile) we may get a clue from finding self.mark embedded
# in unpickled objects.
def
marker
(
self
):
def
marker
(
self
):
stack
=
self
.
stack
stack
=
self
.
stack
mark
=
self
.
mark
mark
=
self
.
mark
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment