Re: Make a python property with the same name as the class member name

2009-02-27 Thread Chris Rebert
On Fri, Feb 27, 2009 at 5:59 AM, Ravi wrote: > Is it possible in python to create a property with the same name as > the member variable name of the class. e.g. No, because accessing the property and the instance variable are *syntactically identical* (it's the raison detre of properties) so ther

Make a python property with the same name as the class member name

2009-02-27 Thread Ravi
Is it possible in python to create a property with the same name as the member variable name of the class. e.g. Class X: ... self.i = 10 # marker ... property(fget = get_i, fset = set_i) Please tell me how I can do so. Because if I do so, for the statement at marker I get stack ov