Raymond Hettinger added the comment:

I think  change this would be risky and could break code that uses dir() to 
actually know what is in a module.

IIRC, this was discussed when __all__ was introduced. I believe it was decided 
that __all__ would affect from-imports and help() but not dir().  This decision 
has been in place for a long time now and I would expect that people (and 
tools) have come to rely on the current behavior.

----------
nosy: +brett.cannon, rhettinger

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

Reply via email to