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.

Author ncoghlan
Recipients levkivskyi, ncoghlan
Date 2017-12-10.00:39:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
For documentation of this feature, I'd suggest adding a new subsection after (but at the same level), called "Customizing module attribute access".

That can then cover defining __getattr__ and __dir__ as module level functions, and also mention setting __class__ (which would be enough to close issue 27505 as well).

The new section should explicitly mention that these only affect lookups and modifications made using the attribute access syntax - directly accessing the module globals (whether by code within the module, or via a reference to the module's globals dict) is unaffected.
Date User Action Args
2017-12-10 00:39:16ncoghlansetrecipients: + ncoghlan, levkivskyi
2017-12-10 00:39:16ncoghlansetmessageid: <>
2017-12-10 00:39:16ncoghlanlinkissue32225 messages
2017-12-10 00:39:16ncoghlancreate