[Python-Dev] Add __exports__ to modules

Tim Peters tim.one@home.com
Mon, 8 Jan 2001 03:17:59 -0500


[Greg Stein]
> Simple question: so what?
>
> "Oh, no! My module exposes mod.sys! Oh, woe is me!"  *snort*

Couldn't care less about the module author.  It's the module user who has to
sort this stuff out.  "Don't use 'import *'" is good advice but not followed
either, and after I do

from MyPackage import sys  # intentionally exports its own sys
from GregSnort import *    # accidentally exports some other sys

madness ensues.  Like I said, it's inelegant, and at best.

Simple question for you:  what would __exports__ hurt?  "Oh, no!  Tim's
module explicitly lists what it intended to export!  Oh, woe is me!".  Gimme
a break.