git://git.eng.unimelb.edu.au
/
python-guide.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Adding nested unpacking
[python-guide.git]
/
docs
/
writing
/
style.rst
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
~~~~~~~~~~~~~~~~~~~~~~~~~~