Kaydet (Commit) 0ac63f1c authored tarafından Georg Brandl's avatar Georg Brandl

#5296: sequence -> iterable.

üst 52f6b6d5
...@@ -118,8 +118,8 @@ Assignment of an object to a target list is recursively defined as follows. ...@@ -118,8 +118,8 @@ Assignment of an object to a target list is recursively defined as follows.
* If the target list is a single target: The object is assigned to that target. * If the target list is a single target: The object is assigned to that target.
* If the target list is a comma-separated list of targets: The object must be a * If the target list is a comma-separated list of targets: The object must be an
sequence with the same number of items as there are targets in the target list, iterable with the same number of items as there are targets in the target list,
and the items are assigned, from left to right, to the corresponding targets. and the items are assigned, from left to right, to the corresponding targets.
(This rule is relaxed as of Python 1.5; in earlier versions, the object had to (This rule is relaxed as of Python 1.5; in earlier versions, the object had to
be a tuple. Since strings are sequences, an assignment like ``a, b = "xy"`` is be a tuple. Since strings are sequences, an assignment like ``a, b = "xy"`` is
...@@ -143,9 +143,9 @@ Assignment of an object to a single target is recursively defined as follows. ...@@ -143,9 +143,9 @@ Assignment of an object to a single target is recursively defined as follows.
be deallocated and its destructor (if it has one) to be called. be deallocated and its destructor (if it has one) to be called.
* If the target is a target list enclosed in parentheses or in square brackets: * If the target is a target list enclosed in parentheses or in square brackets:
The object must be a sequence with the same number of items as there are targets The object must be an iterable with the same number of items as there are
in the target list, and its items are assigned, from left to right, to the targets in the target list, and its items are assigned, from left to right,
corresponding targets. to the corresponding targets.
.. index:: pair: attribute; assignment .. index:: pair: attribute; assignment
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment