[Python-3000] suggestion: structured assignment
Guido van Rossum
guido at python.org
Thu May 29 21:19:52 CEST 2008
On Thu, May 29, 2008 at 10:51 AM, <allyourcode at gmail.com> wrote:
> This is in response to Stefan Behnel, who wrote
>
> ----
>
> Tutorial section on "tuples and sequences", not quite the most hidden place in
> the universe.
>
> http://docs.python.org/tut/node7.html#SECTION007300000000000000000
>
> Stefan
>
> ----
>
> I just read that section twice and no where does it mention that
> Python does what I was suggesting. In fact, by the discussion on
> sequence unpacking, it seems to imply that Python does *not* do what I
> wanted.
It implies no such thing. It says "tuples may be nested" but fails to
show an example of a nested tuple on the LHS of an assignment. I don't
see how you can draw the conclusion from this that it's not supported.
> PS: Sorry for letting all of this sarcasm get under my skin and clog
> up the mailing list, but it's really mean spirited and unnecssary.
You can't very well demand that a tutorial have examples of every
feature. Perhaps (continuing the sarcasm for a bit) you also didn't
think that tuples could be nested more than one level, since there is
no example of that? Plus, you could have tried this in the interactive
interpreter in 10 seconds rather than spawning a long thread.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list