Are multiple return values really harmful? (Re: determining the number of output arguments)

Lonnie Princehouse finite.automaton at gmail.com
Thu Nov 18 13:05:23 EST 2004


Not quite the syntax you want, but better imho since it doesn't
involve name redundancy:

locals().update( {'a': 1, 'b': 2, 'c': 3} )


Greg Ewing <greg at cosc.canterbury.ac.nz> wrote in message news:<30001hF2ptnqcU1 at uni-berlin.de>...
> 
> Maybe things would be better if we had "dict unpacking":
> 
>    a, c, b = {'a': 1, 'b': 2, 'c': 3}
> 
> would give a == 1, c == 3, b == 2. Then we could
> accept outputs by keyword as well as inputs...



More information about the Python-list mailing list