At 09:22 PM 3/28/2006 +0200, Georg Brandl wrote: >Hi, > >since I found myself writing "if __name__ == '__main__'" >often these days, I wondered whether PEP 299 could be pronounced >upon. I'm not proposing putting it into 2.5, but it should be >relatively small a change. A couple of issues that the PEP doesn't address: * How can you write code that runs in multiple Python versions with this? If you use the current idiom to invoke __main__, it's going to get invoked twice. * A module that imports __main__ (using "import __main__") is going to get a TypeError unless the implementation checks that __main__ is not in fact the __main__ module.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4