[Python-ideas] making a module callable
Eric Snow
ericsnowcurrently at gmail.com
Sat Nov 23 01:26:33 CET 2013
On Fri, Nov 22, 2013 at 4:35 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Eric Snow wrote:
>>
>> With a special-case for __name__ == "__main__" of course. :)
>
>
> I don't see how that's a special case. The module really is
> called "__main__". That's the name it appears under in
> sys.modules, which is what matters here.
It's relevant because no one should be replacing __main__ in sys.modules. :)
-eric
More information about the Python-ideas
mailing list