From: guibog Date: Sun, 24 Jun 2012 13:47:24 +0000 (+0800) Subject: Adding nested unpacking X-Git-Url: https://git.eng.unimelb.edu.au/public?p=python-guide.git;a=commitdiff_plain;h=513bb5fe5146cbc9d5454e93abb7c7a61c050e22 Adding nested unpacking --- diff --git a/docs/writing/style.rst b/docs/writing/style.rst index 0be34fc..4198c27 100644 --- 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~