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
9527e61f
Commit
9527e61f
authored
Jan 28, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of the _quotes global. Used only once, and is trivial.
parent
85208ad3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
Lib/pickle.py
Lib/pickle.py
+1
-3
No files found.
Lib/pickle.py
View file @
9527e61f
...
@@ -156,8 +156,6 @@ _tuplesize2code = [EMPTY_TUPLE, TUPLE1, TUPLE2, TUPLE3]
...
@@ -156,8 +156,6 @@ _tuplesize2code = [EMPTY_TUPLE, TUPLE1, TUPLE2, TUPLE3]
__all__
.
extend
([
x
for
x
in
dir
()
if
re
.
match
(
"[A-Z][A-Z0-9_]+$"
,
x
)])
__all__
.
extend
([
x
for
x
in
dir
()
if
re
.
match
(
"[A-Z][A-Z0-9_]+$"
,
x
)])
del
x
del
x
_quotes
=
[
"'"
,
'"'
]
# Pickling machinery
# Pickling machinery
...
@@ -826,7 +824,7 @@ class Unpickler:
...
@@ -826,7 +824,7 @@ class Unpickler:
def
load_string
(
self
):
def
load_string
(
self
):
rep
=
self
.
readline
()[:
-
1
]
rep
=
self
.
readline
()[:
-
1
]
for
q
in
_quotes
:
for
q
in
"
\
"
'"
:
# double or single quote
if
rep
.
startswith
(
q
):
if
rep
.
startswith
(
q
):
if
not
rep
.
endswith
(
q
):
if
not
rep
.
endswith
(
q
):
raise
ValueError
,
"insecure string pickle"
raise
ValueError
,
"insecure string pickle"
...
...
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