[Python-Dev] PEP 549: Instance Properties (aka: module properties)

Guido van Rossum guido at python.org
Wed Sep 13 14:49:07 EDT 2017

 > Why not adding both? Properties do have their uses as does __getattr__.

In that case I would just add __getattr__ to module.c, and add a recipe or
perhaps a utility module that implements a __getattr__ you can put into
your module if you want @property support. That way you can have both but
you only need a little bit of code in module.c to check for __getattr__ and
call it when you'd otherwise raise AttributeError.

--Guido van Rossum (python.org/~guido <http://python.org/%7Eguido>)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170913/963b9402/attachment.html>

More information about the Python-Dev mailing list