[Python-3000] PEP 3113 (Removal of Tuple Parameter Unpacking)

Josiah Carlson jcarlson at uci.edu
Mon Mar 5 19:54:21 CET 2007


"Jim Jewett" <jimjjewett at gmail.com> wrote:
>     >>> def f(name, addr:tuple(street_num, street, city, state, zip)):
>     ...         street_num, street, city, state, zip = addr

Except that it won't work; annotations are evaluated at function
definition time, so street_num, street, city, state, zip would need to
exist as actual names.  It could certainly be faked with X.street_num,
but it's all up to the desires of the person doing the annotations.

 - Josiah



More information about the Python-3000 mailing list