Calling functions

Fredrik Lundh fredrik at
Thu Oct 19 18:31:09 CEST 2006

Tommy Grav wrote:

> I have a small program that goes something like this
> def funcA() : pass
> def funcB() : pass
> def funcC() : pass
> def determine(f):
>     t = f()
>     return t
> What I would like to do is be able to 
> n = determine(funcA)
> m = determine(funcB)
> But I can't really figure out how to do this

really?  the code you posted does work, to some extent (it doesn't
raise any errors, but since your functions don't contain any "return" 
statements, they'll return None, and both "n" and "m" will be set to None).

what did you expect this to do?


More information about the Python-list mailing list