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

Delaney, Timothy C (Timothy) tdelaney at avaya.com
Thu Nov 18 17:16:05 EST 2004


Lonnie Princehouse wrote:

> Not quite the syntax you want, but better imho since it doesn't
> involve name redundancy:
> 
> locals().update( {'a': 1, 'b': 2, 'c': 3} )

"locals()

Update and return a dictionary representing the current local symbol
table. Warning: The contents of this dictionary should not be modified;
changes may not affect the values of local variables used by the
interpreter."

Read that warning. Really well.

Tim Delaney



More information about the Python-list mailing list