[Python-Dev] Add __exports__ to modules

Paul Prescod paulp@ActiveState.com
Mon, 08 Jan 2001 09:01:49 -0800

Andrew Kuchling wrote:
> ...
> Could we then simply adopt __exports__ as a convention for such
> browsers, but with no changes to core Python to support it?  Browsers
> would then follow the algorithm "Use __exports__ if present, dir() if
> not."

dir() is one of the "interactive tools" I'd like to work better in the
presence of __exports__. On the other hand, dir() works pretty poorly
for object instances today so maybe we need something new anyhow. 
Perhaps attrs()? 

If there were an "attrs()" and it basically returned __exports__ if it
existed and dir() if it didn't, then I would buy it. Graphical apps
would just build on attrs().