summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-02-19 04:22:03 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-02-19 04:22:03 (GMT)
commitd75fcb4ddfb76b290083982e44b80582ab13aae2 (patch)
tree0d9a58da6e89a9d44d07546d32770b7adb029c8e /Doc/reference
parente69a6b2ddf3eb37df79d7f0d52339a8cab238bc8 (diff)
downloadcpython-d75fcb4ddfb76b290083982e44b80582ab13aae2.zip
cpython-d75fcb4ddfb76b290083982e44b80582ab13aae2.tar.gz
cpython-d75fcb4ddfb76b290083982e44b80582ab13aae2.tar.bz2
Merged revisions 69576,69579-69580,69589,69619-69620,69633,69703-69704,69728-69730 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69576 | georg.brandl | 2009-02-13 04:56:50 -0600 (Fri, 13 Feb 2009) | 1 line #1661108: note that urlsafe encoded string can contain "=". ........ r69579 | georg.brandl | 2009-02-13 05:06:59 -0600 (Fri, 13 Feb 2009) | 2 lines Fix warnings GCC emits where the argument of PyErr_Format is a single variable. ........ r69580 | georg.brandl | 2009-02-13 05:10:04 -0600 (Fri, 13 Feb 2009) | 2 lines Fix warnings GCC emits where the argument of PyErr_Format is a single variable. ........ r69589 | martin.v.loewis | 2009-02-13 14:11:34 -0600 (Fri, 13 Feb 2009) | 2 lines Move amd64 properties further to the top, so that they override the linker options correctly. ........ r69619 | benjamin.peterson | 2009-02-14 11:00:51 -0600 (Sat, 14 Feb 2009) | 1 line this needn't be a shebang line ........ r69620 | georg.brandl | 2009-02-14 11:01:36 -0600 (Sat, 14 Feb 2009) | 1 line #5179: don't leak PIPE fds when child execution fails. ........ r69633 | hirokazu.yamamoto | 2009-02-15 03:19:48 -0600 (Sun, 15 Feb 2009) | 1 line Fixed typo. ........ r69703 | raymond.hettinger | 2009-02-16 16:42:54 -0600 (Mon, 16 Feb 2009) | 3 lines Issue 5229: Documentation for super() neglects to say what super() actually does ........ r69704 | raymond.hettinger | 2009-02-16 17:00:25 -0600 (Mon, 16 Feb 2009) | 1 line Add explanation for super(type1, type2). ........ r69728 | georg.brandl | 2009-02-17 18:22:55 -0600 (Tue, 17 Feb 2009) | 2 lines #5297: fix example. ........ r69729 | georg.brandl | 2009-02-17 18:25:13 -0600 (Tue, 17 Feb 2009) | 2 lines #5296: sequence -> iterable. ........ r69730 | georg.brandl | 2009-02-17 18:31:36 -0600 (Tue, 17 Feb 2009) | 2 lines #5268: mention VMSError. ........
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/simple_stmts.rst13
1 files changed, 9 insertions, 4 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 1e3cb85..d1e89e5 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -116,7 +116,12 @@ square brackets, 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:
+* 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
+ now legal as long as the string has the right length.)
* If the target list contains one target prefixed with an asterisk, called a
"starred" target: The object must be a sequence with at least as many items
@@ -152,9 +157,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