summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-16 14:39:45 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-07-16 14:39:45 (GMT)
commit44c2ffd38fcb7215a4f24ac519575ca504453351 (patch)
tree0b63159bd9ed211ad2b6ee8cfc08508ca6f27ffd /Lib
parent7b9bcb84112a2009b8639e1ca57a7574c7c3aa70 (diff)
downloadcpython-44c2ffd38fcb7215a4f24ac519575ca504453351.zip
cpython-44c2ffd38fcb7215a4f24ac519575ca504453351.tar.gz
cpython-44c2ffd38fcb7215a4f24ac519575ca504453351.tar.bz2
Corrected TUPLE<N> opcodes' docs.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/pickletools.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/Lib/pickletools.py b/Lib/pickletools.py
index 7c4f9f9..c870261 100644
--- a/Lib/pickletools.py
+++ b/Lib/pickletools.py
@@ -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:])]
"""),