[Python-checkins] peps: Closes #16916: clarify "slicing equivalent to extended unpacking" example: the

georg.brandl python-checkins at python.org
Fri Jan 11 19:07:31 CET 2013


http://hg.python.org/peps/rev/a0077c1d201d
changeset: 4664:a0077c1d201d
user: Georg Brandl <georg at python.org>
date: Fri Jan 11 19:08:14 2013 +0100
summary:
 Closes #16916: clarify "slicing equivalent to extended unpacking" example: the latter always creates a list.
files:
 pep-3132.txt | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pep-3132.txt b/pep-3132.txt
--- a/pep-3132.txt
+++ b/pep-3132.txt
@@ -68,7 +68,7 @@
 For example, if ``seq`` is a slicable sequence, all the following
 assignments are equivalent if ``seq`` has at least three elements::
 
- a, b, c = seq[0], seq[1:-1], seq[-1]
+ a, b, c = seq[0], list(seq[1:-1]), seq[-1]
 a, *b, c = seq
 [a, *b, c] = seq
 
-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /