*damn* it :-) python rocks.
thx
michael .oO (resetting c/c++/java crap collected over the years)
--
http://mail.python.org/mailman/listinfo/python-list
# class Cell(object):
# def __init__(self, initialvalue = 0):
#self._func = lambda x: x
#self.__value = initialvalue
#
# def setvalue (self, newvalue):
# self.__value = self._func(newvalue)
#
# def getvalue (self):
# return self.__value
#
# def delval
If what you want is to insert a method into an
instance, look at new.instancemethod.
John Roth
"michael" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
below is a snipplet that could be seen as a part of a spreadsheet with
getter and setter properties and a way how to dynamically
Hi,
below is a snipplet that could be seen as a part of a spreadsheet with
getter and setter properties and a way how to dynamically insert
function to be used when setting the value of a "cell" instance
import new
import inspect
class Cell (object):
def __init__ (self, initialvalue = 0):