"peter" <[EMAIL PROTECTED]> wrote > ---------------------------------------------------------------------------- > PYTHON-CODE # REMARKS > referenceA = SomeObject() # referenceA -> SomeObject() > # references to the memory space of > # some object > referenceB = referenceA # referenceB -> SomeObject() > # is also a reference to ... > referenceA = referenceB # referenceA references to SomeObject() > > # now for functions! > fA = function # fA references to memory space > # of a function
nope. it refers to a function object. function objects are no different from ordinary objects. > def newFA(input): # newFA references to a function not yet. > return fA(input) # which holds a reference to fA. nope. the function does not hold a reference to fA. fA is a global, and will be resolved at runtime. > # Notice the important difference with objects! > # newFA holds a reference to the reference fA no, it doesn't hold a reference to the reference. it contains the name "fA", and will look for that when you call it. > # When using object you reference to > # the memory space of fA!!! you're confused. resetting your brain and reading the documentation again might help: http://docs.python.org/ref/objects.html http://docs.python.org/ref/naming.html </F> -- http://mail.python.org/mailman/listinfo/python-list