homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients asksol, brett.cannon, brian.curtin, georg.brandl, jnoller, michael.foord, ncoghlan, pitrou, terry.reedy, vstinner
Date 2011年01月29日.13:14:50
SpamBayes Score 4.862466e-11
Marked as misclassified No
Message-id <1296306891.07.0.543642257285.issue10845@psf.upfronthosting.co.za>
In-reply-to
Content
Nick, a more problematic issue is that __main__ is always called __main__, regardless of whether it is actually imported as the real "main module" or through a regular import. This means that it is impossible to discriminate between both uses by using "if __name__ == '__main__'", which in turn means that top-level code will always get executed as a side-effect of importing, which means the "__main__.py" feature is completely broken for use with multiprocessing under Windows!
This also shows, IMO, how uselessly complicated and misleading the import system has become.
History
Date User Action Args
2011年01月29日 13:14:51pitrousetrecipients: + pitrou, brett.cannon, georg.brandl, terry.reedy, ncoghlan, vstinner, jnoller, michael.foord, brian.curtin, asksol
2011年01月29日 13:14:51pitrousetmessageid: <1296306891.07.0.543642257285.issue10845@psf.upfronthosting.co.za>
2011年01月29日 13:14:50pitroulinkissue10845 messages
2011年01月29日 13:14:50pitroucreate

AltStyle によって変換されたページ (->オリジナル) /