[Tutor] Which is better Practice and why
jeanpierreda at gmail.com
Tue Oct 23 14:11:11 CEST 2012
On Tue, Oct 23, 2012 at 5:59 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> I think you'll find that you're wrong there :)
>> If I want to test something, I put it in another file.
> Yes. And how do you import the __main__.py module to test it, without
> it executing?
How do you test the body of code in the "if __name__ == '__main__'"
block, without it executing?
More information about the Tutor