[Python-ideas] Replacing the if __name__ == "__main__" idiom (was Re: making a module callable)
Terry Reedy
tjreedy at udel.edu
Tue Nov 26 00:37:14 CET 2013
On 11/25/2013 5:31 PM, Eric Snow wrote:
> On Mon, Nov 25, 2013 at 3:14 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> (I also understand that it relies on a more-or-less implementation
>> detail, but the implementation detail will have to stay for
>> compatibility reasons, anyway)
>
> What implementation detail are you talking about?
The fact that .__name__ is set to "__main__" in the main module.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list