Re: [Python-Dev] PEP 343 - next steps

June 13, 2005
8:24 p.m.
But I cannot do this:
def f(x as (a, b)): # ...
which is what I was suggesting.
Yeah, I knew that. How important is that to you?
I would really have liked it for a program I was working on at one time that had lots of small methods that passed around values of forms such as (a,(b,c)). Each method would pick one or more of the components out of its compound value and then would sometimes pass the entire value down to the next level. Of course I could do it this way: def f(x): (a,(b,c)) = x # ... but in this particular application, "as" would have offered significant extra convenience. I understand that this is not a real big deal, which is why I haven't written up a PEP :-)
7199
Age (days ago)
7199
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andrew Koenig