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
44c2ffd3
Commit
44c2ffd3
authored
Jul 16, 2010
by
Alexander Belopolsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected TUPLE<N> opcodes' docs.
parent
7b9bcb84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
Lib/pickletools.py
Lib/pickletools.py
+11
-8
No files found.
Lib/pickletools.py
View file @
44c2ffd3
...
...
@@ -1250,10 +1250,11 @@ opcodes = [
stack_before
=
[
anyobject
],
stack_after
=
[
pytuple
],
proto
=
2
,
doc
=
"""
One-tuple
.
doc
=
"""
Build a one-tuple out of the topmost item on the stack
.
This code pops one value off the stack and pushes a tuple of
length 1 whose one item is that value back onto it. IOW:
length 1 whose one item is that value back onto it. In other
words:
stack[-1] = tuple(stack[-1:])
"""
),
...
...
@@ -1264,10 +1265,11 @@ opcodes = [
stack_before
=
[
anyobject
,
anyobject
],
stack_after
=
[
pytuple
],
proto
=
2
,
doc
=
"""
One-tuple
.
doc
=
"""
Build a two-tuple out of the top two items on the stack
.
This code pops two values off the stack and pushes a tuple
of length 2 whose items are those values back onto it. IOW:
This code pops two values off the stack and pushes a tuple of
length 2 whose items are those values back onto it. In other
words:
stack[-2:] = [tuple(stack[-2:])]
"""
),
...
...
@@ -1278,10 +1280,11 @@ opcodes = [
stack_before
=
[
anyobject
,
anyobject
,
anyobject
],
stack_after
=
[
pytuple
],
proto
=
2
,
doc
=
"""
One-tuple
.
doc
=
"""
Build a three-tuple out of the top three items on the stack
.
This code pops three values off the stack and pushes a tuple
of length 3 whose items are those values back onto it. IOW:
This code pops three values off the stack and pushes a tuple of
length 3 whose items are those values back onto it. In other
words:
stack[-3:] = [tuple(stack[-3:])]
"""
),
...
...
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