Overwrite only one function with property()
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Sun Nov 19 17:43:55 EST 2006
Kai Kuehne a écrit :
> Hi list!
> It is possible to overwrite only one function with the property-function?
property is not function, it's a class. And it doesn't "overwrite" anything.
> x = property(getx, setx, delx, 'doc')
>
> I just want to overwrite setx, but when I set the others to None,
> I can't read and del the member.
You don't "overwrite" setx, you pass it as an argument to the property
constructor call.
> Any ideas or is this not possible?
Read this, and you'll have a detailed answer:
http://users.rcn.com/python/download/Descriptor.htm
> Thank you!
> Kai
More information about the Python-list
mailing list