dictionary that have functions with arguments
Leif K-Brooks
eurleif at ecritters.biz
Wed Nov 2 02:30:10 EST 2005
More information about the Python-list mailing list
Wed Nov 2 02:30:10 EST 2005
- Previous message (by thread): With & marcos via import hooking? (Was Re: Scanning a file)
- Next message (by thread): dictionary that have functions with arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alex Martelli wrote:
> execfunc = { 'key1' : (func1, ()),
> 'key2' : (func2, args) }
>
> now, something like:
>
> f, a = execfunc[k]
> f(**a)
>
> will work for either key.
Shouldn't func1's args be a dictionary, not a tuple?
- Previous message (by thread): With & marcos via import hooking? (Was Re: Scanning a file)
- Next message (by thread): dictionary that have functions with arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list