7 Sep
2017
7 Sep
'17
9:14 p.m.
Larry Hastings <larry@hastings.org> wrote:
The TL;DR summary: add support for property objects to modules. I've already posted a prototype.
I posted an idea to python-ideas about lazy module loading. If the lazy loading idea works, having properties would allow modules to continue to be "lazy safe" but to easily do init logic when needed, e.g. getting of the property. There should be a very clean way to do that, IMHO. Using __class__ is not clean and it would be unfortunate to have the __class__ song-and-dance in a bunch of modules. Using property() seems more Pythonic.