function pointer

David Brown david at
Wed Sep 11 12:26:44 CEST 2002

"Christina" <christina at> wrote in message
news:ffcedbc9.0209110215.644c1788 at
> Hi!
> Does Python have function pointers? If not, is there a possibility to
emulate them?
> Christina

Functions are first-order objects (is that the right term?) in Python, so
you can just assign them to a variable.  For example:

def foo(x):
    print x

bar = foo


More information about the Python-list mailing list