Hello,

On Fri, 29 May 2020 05:33:57 +1000
Chris Angelico <ros...@gmail.com> 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:pmis...@gmail.com
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/PDRXTEDCFLMLDZDGT7UDXH6ENP2X2FOE/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to