[Python-ideas] making a module callable

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Nov 23 00:35:39 CET 2013


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.

-- 
Greg


More information about the Python-ideas mailing list