Re: Note on PEP 299

2006-07-21 Thread bearophileHUGS
Faulkner: > http://home.comcast.net/~faulkner612/programming/python/mainer.py It's a bit of magic, I'll test it more, but it seems to work binding the main() with Psyco too. I have changed it a little (removed argv passed to the main and the import of type, etc). I don't know if/when I'll use it,

Re: Note on PEP 299

2006-07-21 Thread faulkner
http://home.comcast.net/~faulkner612/programming/python/mainer.py turns if __name__ == '__main__': sys.exit(main(sys.argv)) into import mainer [EMAIL PROTECTED] wrote: > I don't like much the syntax of: > if __name__ == '__main__': > > Some time ago I have read this PEP: > http://www.python.org/de

Re: Note on PEP 299

2006-07-20 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I don't like much the syntax of: > if __name__ == '__main__': > > Some time ago I have read this PEP: > http://www.python.org/dev/peps/pep-0299/ > > And why it was refused: > http://mail.python.org/pipermail/python-dev/2006-March/062955

Note on PEP 299

2006-07-20 Thread bearophileHUGS
I don't like much the syntax of: if __name__ == '__main__': Some time ago I have read this PEP: http://www.python.org/dev/peps/pep-0299/ And why it was refused: http://mail.python.org/pipermail/python-dev/2006-March/062955.html I think the name of the standard main function may be just main(), s