[Python-Dev] PEP 549: Instance Properties (aka: module properties) (original) (raw)
Neil Schemenauer nas at arctrix.com
Thu Sep 7 14:14:12 EDT 2017
- Previous message (by thread): [Python-Dev] PEP 549: Instance Properties (aka: module properties)
- Next message (by thread): [Python-Dev] PEP 550 v4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Larry Hastings <larry at 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.
- Previous message (by thread): [Python-Dev] PEP 549: Instance Properties (aka: module properties)
- Next message (by thread): [Python-Dev] PEP 550 v4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]