STINNER Victor added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23748>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to