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

Ravi ra.ravi.rav at gmail.com
Fri Feb 27 08:59:11 EST 2009


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 overflow for the assingm



More information about the Python-list mailing list