Opposite of __ALL__ in python (for excluding functions)

Viewed 283

I'm quite sure this is a duplicate, but I can't find an answer (I must be searching the wrong terms).

The __all__ variable in python allows you to explicitly note the functions you want included on a global import. I wondered: is there a similar variable (something like __exclude__) that includes __all__ in a global import with the exception of those functions placed in __exclude__?

There are some functions I'd like sphinx to ignore for documentation, and sphinx seems to rely on __all__. But, when I implement new functionality, I'll occasionally forget to add it to __all__ which can be frustrating. It would be much easier to assume everything is to be used with the exception of a few named functions in a variable. Is this possible?

Again, sorry if this is a repeat.

0 Answers
Related