Author martin.panter
Recipients martin.panter
Date 2014-08-22.02:42:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The nntplib.NNTPError exception is documented, but missing from __all__. I ran across another one the other day, but I can’t remember what it was now.

Is there a practical way to automatically test for some of these, perhaps by scanning the documentation for function and class definitions? These sort of bugs keep popping up, as people adding new features, exceptions, etc, forget to append them to __all__.

Another more radical idea: a decorator something like this might avoid copy-paste errors and make unexported APIs stand out more:

def public(api):
    return api

__all__ = list()
def public_function(): ...
class PublicClass: ...

* Issue 18554: os.__all__
* Issue 22191: warnings.__all__
Date User Action Args
2014-08-22 02:42:48martin.pantersetrecipients: + martin.panter
2014-08-22 02:42:48martin.pantersetmessageid: <>
2014-08-22 02:42:48martin.panterlinkissue22247 messages
2014-08-22 02:42:47martin.pantercreate