mirror of https://github.com/python/cpython
Corrected TUPLE<N> opcodes' docs.
This commit is contained in:
parent
7b9bcb8411
commit
44c2ffd38f
|
@ -1250,10 +1250,11 @@ opcodes = [
|
||||||
stack_before=[anyobject],
|
stack_before=[anyobject],
|
||||||
stack_after=[pytuple],
|
stack_after=[pytuple],
|
||||||
proto=2,
|
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
|
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:])
|
stack[-1] = tuple(stack[-1:])
|
||||||
"""),
|
"""),
|
||||||
|
@ -1264,10 +1265,11 @@ opcodes = [
|
||||||
stack_before=[anyobject, anyobject],
|
stack_before=[anyobject, anyobject],
|
||||||
stack_after=[pytuple],
|
stack_after=[pytuple],
|
||||||
proto=2,
|
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
|
This code pops two values off the stack and pushes a tuple of
|
||||||
of length 2 whose items are those values back onto it. IOW:
|
length 2 whose items are those values back onto it. In other
|
||||||
|
words:
|
||||||
|
|
||||||
stack[-2:] = [tuple(stack[-2:])]
|
stack[-2:] = [tuple(stack[-2:])]
|
||||||
"""),
|
"""),
|
||||||
|
@ -1278,10 +1280,11 @@ opcodes = [
|
||||||
stack_before=[anyobject, anyobject, anyobject],
|
stack_before=[anyobject, anyobject, anyobject],
|
||||||
stack_after=[pytuple],
|
stack_after=[pytuple],
|
||||||
proto=2,
|
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
|
This code pops three values off the stack and pushes a tuple of
|
||||||
of length 3 whose items are those values back onto it. IOW:
|
length 3 whose items are those values back onto it. In other
|
||||||
|
words:
|
||||||
|
|
||||||
stack[-3:] = [tuple(stack[-3:])]
|
stack[-3:] = [tuple(stack[-3:])]
|
||||||
"""),
|
"""),
|
||||||
|
|
Loading…
Reference in New Issue