Re: block dynamic attribute creation (was: get descriptor from instance)

2009-02-19 Thread Gabriel Genellina
En Thu, 19 Feb 2009 01:29:17 -0200, Alan G Isaac alan.is...@gmail.com escribió: OK, that's good. I'd like to sometimes lock attribute creation on instances of a class but still allow properties to function correctly. Will something like below be satisfactory? def __setattr__(self, attr,

Re: block dynamic attribute creation (was: get descriptor from instance)

2009-02-18 Thread Alan G Isaac
On 2/18/2009 6:15 PM Gabriel Genellina apparently wrote: type(a).x OK, that's good. I'd like to sometimes lock attribute creation on instances of a class but still allow properties to function correctly. Will something like below be satisfactory? Thanks, Alan def __setattr__(self, attr,