how do you use a closure in a class
erinhouston at gmail.com
erinhouston at gmail.com
Wed Mar 30 09:32:56 EST 2005
What I wanted it to know how to. Take a function like.
Note replace ... with spaces.
def makeAddr(tAdd):
....def add(tNum):
........return tNum + tAdd
....return add
In a class so I make several functions that do the same thing but on
diffrent objects.
I ended up writing a base function and just wrapping it for all the
cases. If there is a way to use this type of function to create class
functions I would like to know how.
More information about the Python-list
mailing list