Re: list/dictionary as case statement ?
by Stef Mientki other posts by this author
Jan 2 2007 2:42PM messages near this date
Re: list/dictionary as case statement ?
|
Re: list/dictionary as case statement ?
>
> Yes. Functions are (so called) first class objects. You can refer to one
> by name, and pass that reference around in variables and other data
> structures.
>
> That said, your code above won't work as written because function1 is
> not in existence when you refer to it.
>
Yes, I just found that out.
Thanks Gary and Grant,
this principle really works like a charm.
cheers,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Stef Mientki
Bruno Desthuilliers
Bjoern Schliessmann
Tom Plunket
Stef Mientki
Bjoern Schliessmann
Mrab
Tom Plunket
Hendrik van Rooyen
Gary Herron
Stef Mientki
Grant Edwards
|