diff options
author | Georg Brandl <georg@python.org> | 2009-02-18 00:25:13 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-02-18 00:25:13 (GMT) |
commit | 0ac63f1c504e85fa0b2a19983af209e00b1b6ff4 (patch) | |
tree | e89c2ccb8ef54935f9b7f312e7d8039c99aeaa6e /Doc/reference | |
parent | 52f6b6d500c428602420538c7e1fd5f4d312c613 (diff) | |
download | cpython-0ac63f1c504e85fa0b2a19983af209e00b1b6ff4.zip cpython-0ac63f1c504e85fa0b2a19983af209e00b1b6ff4.tar.gz cpython-0ac63f1c504e85fa0b2a19983af209e00b1b6ff4.tar.bz2 |
#5296: sequence -> iterable.
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/simple_stmts.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 238e02e..87ce403 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -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 comma-separated list of targets: The object must be a - sequence with the same number of items as there are targets in the target list, +* If the target list is a comma-separated list of targets: The object must be an + 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. (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 @@ -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. * 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 - in the target list, and its items are assigned, from left to right, to the - corresponding targets. + The object must be an iterable with the same number of items as there are + targets in the target list, and its items are assigned, from left to right, + to the corresponding targets. .. index:: pair: attribute; assignment |