[Tutor] Accessing Functions By Reference

Gooch, John John.Gooch at echostar.com
Thu Oct 21 17:05:15 CEST 2004


Is it possible to access a function by reference? I.e. it's address in
memory? What I would like to do it pass in a reference to a function when
creating an instance of a class, so that the class can make use of that
function via that reference. 

e.g. def somefunction( blah ):
	do something with blah
	return something

myclass =  SomeClass( <reference to somefunction> )
print str( myclass.referenceToSomeFunction( someValue ) ) 




John A. Gooch
Systems Administrator
IT - Tools
EchoStar Satellite L.L.C.
9601 S. Meridian Blvd.
Englewood, CO  80112
Desk: 720-514-5708 


More information about the Tutor mailing list