[issue39452] Improve the __main__ module documentation

Guido van Rossum report at bugs.python.org
Mon Aug 30 17:31:56 EDT 2021


Guido van Rossum <guido at python.org> added the comment:

Thanks, the rewrite is great!

I have one nit: did you consider which of these two idioms is better?

if __name__ == "__main__":
    main()

vs.

if __name__ == "__main__":
    sys.exit(main())

Your docs seem to promote the second, whereas I've usually preferred the former. Was this a considered choice on your part?

----------
nosy: +gvanrossum

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39452>
_______________________________________


More information about the Python-bugs-list mailing list