This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: __getattr__ and __setattr__ methods for modules
Type: enhancement Stage: test needed
Components: Interpreter Core Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, georg.brandl
Priority: normal Keywords:

Created on 2005-03-04 08:24 by georg.brandl, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg61191 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-03-04 08:24
Wouldn't it be a good addition if modules supported
__getattr__ and __setattr__?

In this way, one could easily write modules that
dispatch calls to different objects and/or modules,
such as a "global" module.
msg82200 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-02-16 01:02
This won't be done without a PEP anyway.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41653
2009-02-16 01:02:24georg.brandlsetstatus: open -> closed
resolution: wont fix
messages: + msg82200
nosy: + georg.brandl
2009-02-15 23:56:17ajaksu2setstage: test needed
versions: + Python 3.1, Python 2.7
2005-03-04 08:24:44birkenfeldcreate