I created a new class for each instance as you suggested and added the
descriptor to the class. It worked great. Thanks for the help.
Brian Huggins
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 24 Sep 2009 12:14:39 -0300, brian huggins
escribió:
I want to set up descriptors at runtine, but it isn't working the way
i would expect. Does anybody know if this is possible?
class TestDesc (object):
x=Descriptor ("x")
def __init__ (self):
self.y=Descriptor("y")
Hello,
I want to set up descriptors at runtine, but it isn't working the way
i would expect. Does anybody know if this is possible? Here is an
example:
class Descriptor(object):
def __init__(self, name) :
self.val=0
self.name = name
def __get__(self, obj, objtype):