A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149533.html below:

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

[Python-Dev] PEP 549: Instance Properties (aka: module properties) [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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4