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

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