What does __ALL__ mean?

John Roth johnroth at ameritech.net
Thu Feb 27 18:34:45 EST 2003


"Darren Watson" <darren at coolpink.net> wrote in message
news:3a427488.0302271501.168dd230 at posting.google.com...
> Hi
>
> I'm trying to find out what __ALL__ means near the top of the modules
> in the standard library.
>
> As far as I can tell it lists functions and classes but how is this
> used?

It's a list of the public API. If present, it defines which names
are availible in a "from <module> import *" statement.

> Is this something I should put in my own modules?

If you want to maintain absolute control over the API, yes.

John Roth
>
> Thanks for any help
>
> Darren






More information about the Python-list mailing list