git://git.eng.unimelb.edu.au
/
python-guide.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8528261
)
Adding nested unpacking
author
guibog
<guibog@douban.com>
Sun, 24 Jun 2012 13:47:24 +0000
(21:47 +0800)
committer
guibog
<guibog@douban.com>
Sun, 24 Jun 2012 13:47:24 +0000
(21:47 +0800)
docs/writing/style.rst
patch
|
blob
|
history
diff --git
a/docs/writing/style.rst
b/docs/writing/style.rst
index
0be34fc
..
4198c27
100644
(file)
--- a/
docs/writing/style.rst
+++ b/
docs/writing/style.rst
@@
-232,6
+232,12
@@
You can use this to swap variables, as well:
a, b = b, a
+Nested unpacking works too:
+
+.. code-block:: python
+
+ a, (b, c) = 1, (2, 3)
+
Create an ignored variable
~~~~~~~~~~~~~~~~~~~~~~~~~~