[Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)
Jim Jewett
jimjjewett at gmail.com
Mon Mar 5 16:06:23 CET 2007
On 3/5/07, Andrew Koenig <ark-mlist at att.net> wrote:
> > FWIW, I always liked the `parameter passing is assignment` semantics
> > of Python. I sure hope nobody is going to start a crus^H^H^H^HPEP to
> > remove tuple unpacking in general from the language!
> Isn't the point of this discussion that it is already gone?
Nobody has even suggested removing tuple-unpacking in general.
The question is whether to continue doing it implicitly in function
parameters.
Today, you can write:
>>> def f(name, (street_num, street, city, state, zip)):
In python 3, you will probably have to write:
>>> def f(name, addr):
... street_num, street, city, state, zip = addr
or possibly the redundant
>>> def f(name, addr:tuple(street_num, street, city, state, zip)):
... street_num, street, city, state, zip = addr
if you want the documentation value.
-jJ
More information about the Python-3000
mailing list