[Python-Dev] PEP 549: Instance Properties (aka: module properties)
levkivskyi at gmail.com
Wed Sep 13 18:01:21 EDT 2017
> One would have to introduce some kind of convention
> where you can write properties with a leading _
One doesn't even need the @property decorator in this case.
g = globals()
name = '_' + name
if name in g:
One can even write a decorator that would change the name automatically
(but this will require a call at the end of module to unbind original
The space for play is infinite. The question is what exactly is needed.
I would say that already basic customisation (like __getattr__) will be
IIUC, this will be actually a bit faster than setting __class__ since only
attributes will be affected.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev