Hello, On Fri, 29 May 2020 05:33:57 +1000 Chris Angelico <[email protected]> wrote:
[] > People can already put all their main logic into a function. If you > want to unit-test your main function, that's the best way to do it. > The trouble is, how much goes into main() and how much into if > __name__ == '__main__'? For example: Does your main function accept a > list of arguments, or does it look in sys.argv? Neither answer is > wrong. And that means the best way is to NOT force everyone across all > of Python to choose the same way - let people write their code their > way. Yes. Besides, "principled" and "uncompromising" linters and code formatters are recently on a rise, so hopefully everyone/every team can choose a style per their likes, without putting burden on all the other users of the language. > > ChrisA -- Best regards, Paul mailto:[email protected] _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/PDRXTEDCFLMLDZDGT7UDXH6ENP2X2FOE/ Code of Conduct: http://python.org/psf/codeofconduct/
