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 vstinner
Recipients pythonhacker, vstinner
Date 2015-03-23.12:18:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427113127.84.0.694499189426.issue23748@psf.upfronthosting.co.za>
In-reply-to
Content
> Hmmm... dear sir -  what prevents you from adding an __all__ to the module with these cache variables excluded ?

You didn't understand the general philosophy, we are not hidding internals. For the specific case of platform._uname_cache, it uses the "_" prefix which is an indicator saying that "you are not supposed to modify it except if you really understand what do you". It's useful to have this variable modifiable, for unit tests for example.

I don't see how adding __all__ variable to the platform would change anything. Variables prefixed by "_" are already excluded when using "from platform import *".

If you don't understand the Python philosophy, please open a thread on python-ideas or even python-dev mailing list, to get a longer explanation.

Read also the PEP 20.
History
Date User Action Args
2015-03-23 12:18:47vstinnersetrecipients: + vstinner, pythonhacker
2015-03-23 12:18:47vstinnersetmessageid: <1427113127.84.0.694499189426.issue23748@psf.upfronthosting.co.za>
2015-03-23 12:18:47vstinnerlinkissue23748 messages
2015-03-23 12:18:47vstinnercreate