<div dir="ltr"><div>Sorry for digging this old topic back. I see that my "'property' does not play well with polymorphic code" comment generated some controversy. So here's something in my defense:<br>
<br>Here's the link to stackoveflow topic I am talking about:<br>  <a href="http://stackoverflow.com/questions/237432/python-properties-and-inheritance">http://stackoverflow.com/questions/237432/python-properties-and-inheritance</a><br>
</div><div><br>The solution that fits my taste:<br><a href="http://stackoverflow.com/a/14349742">http://stackoverflow.com/a/14349742</a><br><br>A related blogpost:<br>  <a href="http://requires-thinking.blogspot.com/2006/03/note-to-self-python-properties-are-non.html">http://requires-thinking.blogspot.com/2006/03/note-to-self-python-properties-are-non.html</a><br>
</div><div><br></div><div>Yes, I like decorators and descriptors. I also like the ability to create a "virtual property" in a python class by binding a bunch of methods as setter/getter. But I find the implementation of this "virtual property feature" a bit awkward sometimes - every time I need to override a getter/setter in a child class, I need to decorate them again. Some of you may like this "explicitness", but I don't.<br>
<br><div class=""><div class=""><span name="Steven D'Aprano" class="">To Steven D'Aprano</span>: Seriously, what's all the bashing in your last reply about? You dissected my "thank-you reply" more strictly than the python interpreter checking for syntax errors. Not in a mood for fight, but I find your opinions about "bug finding time", "hacks" and "stackoverflow" quite silly.<br>
</div></div></div></div>