On 3/07/20 5:42 am, Matthew Einhorn wrote:
I think what he may have meant is that if you tried accessing a double-underscore property of the outer class from the get/set methods, it won't properly de-mangle.

Ah, I see what you mean. I don't think that's a fatal problem;
double-underscore names don't seem to get used very much, and
if you did want to use one, it would just mean you couldn't
use this particular way of defining properties.

Similarly, if you wanted to overwrite a property by using this property approach in the sub-class, but also call super for the parent's class property getter from within the get/set this wouldn't work!?

This is a problem with properties however you create them, and
the same tecnhiques apply for dealing with it. You need to find
the property object from the base class and extract its getter.

--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LXH2BKQMORI5TR57UYRLT7XET7BTEIP2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to