Re: setting up dynamic descriptors in Python

2009-09-29 Thread brian h
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

Re: setting up dynamic descriptors in Python

2009-09-25 Thread Gabriel Genellina
En Thu, 24 Sep 2009 12:14:39 -0300, brian huggins bgh...@aol.com 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):

setting up dynamic descriptors in Python

2009-09-24 Thread brian huggins
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):