14 Jul
2007
14 Jul
'07
4:58 p.m.
At 02:58 PM 7/14/2007 +1200, Greg Ewing wrote:
Andy C wrote:
What does "if __name__ == '__main__" mean in __main__.py? : ) If someone tries does import __main__ from another module in the program, won't that result in an infinite loop?
Is there a reason not to use __init__.py for this?
Even some moderately-experienced Python developers confuse the concepts of "package" and "directory containing Python code" -- let's not make it worse by encouraging the inclusion of an __init__ module in the top-level package namespace!