function pointers

Neil Hodgson nhodgson at bigpond.net.au
Thu Apr 26 05:34:20 EDT 2001


Brandon Van Every:
> I get the feeling that Python doesn't have anything resembling a function
> pointer?  i.e. no way to call a specific function according to the value a
> variable is set to?  In fact, I get the feeling it doesn't have pointers
of
> any sort at all?

   Python has pointers everywhere:
def x():
    print "x"
def y():
    print "y"
m = x
m()
m = y
m()

   Neil






More information about the Python-list mailing list