[Python-Dev] Keyword module cruft question

Martin v. Loewis martin@v.loewis.de
30 Oct 2002 00:02:16 +0100


"Patrick K. O'Brien" <pobrien@orbtech.com> writes:

> But it does look sloppy when you are writing about introspection and
> you see an attribute that has no real value. I wish it weren't
> there, as I'd rather not have to explain it. But it got me thinking
> whether other modules in the standard library have this issue, and
> whether this is something that should be cleaned up. Thoughts?

Normally, this is fixed with __all__: The module may have arbitrary
variables; the interface is only those identifiers mentioned in
__all__ (in absence of __all__, its only those identifiers which are
documented).

So I don't think this is an issue, in general. In a specific case,
there is nothing wrong with fixing it.

Regards,
Martin