Function arguments
Diez B. Roggisch
deets at nospam.web.de
Mon Jan 26 04:11:28 EST 2009
brasse schrieb:
> Hello!
>
> Is there any way that I can get at all the arguments passed to a
> function as a map without using keyword arguments?
>
> def foo(a, b, c):
> # Can I access all the arguments in a collection somewhere?
>
> I'm mainly curious since I have stumbled on to some cases where it
> might have been nice to be able to do that.
There is the locals()-call that returns the local variables as dictionary.
Diez
More information about the Python-list
mailing list