On 2021-03-03 14:06, Chris Angelico wrote:
You could implement that yourself:
__all__ = {n for n in globals() if not n.startswith("_")} - __exclude_all__
Sort of. That will only work if you define __all__ at the end of the
file. But usually you want to define it at the beginning as a sort of
documentation aid ("this is the public API").
I do think something like __exclude_all__ would be handy. It can be
annoying to have to define __all__ just to exclude a few things. But
it's not a huge issue.
--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is no
path, and leave a trail."
--author unknown
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/AMYTPPC7DH5AKNIMCAX2WLYMGJZDC5CS/
Code of Conduct: http://python.org/psf/codeofconduct/