I disagree that "it teaches a lot about how Python works" is a good reason to keep things the way they are. If you applied this principle more broadly, it would seem to be an argument in favour of complexity in most situations, that would imply we should keep syntactic sugar to a bare minimum at all times.

Learning about how Python works under the hood is extremely valuable for becoming a more advanced programmer. However, not everybody needs to be a mechanic to drive a car. We should surely make it as easy as possible for beginners to write fully functional scripts that conform to best practices.

I love this proposal. "if__name__ == '__main__'" has always felt, to me, as though it flies in the face of the simplicity and elegance Python generally prizes in other parts of the language.

Best wishes,
Alex

On 2 Oct 2021, at 11:00, Abdur-Rahmaan Janhangeer <arj.python@gmail.com> wrote:


Greetings list,

I am -1 on this proposition.

I can relate that if name == main is very confusing to teach.
However, it teaches a lot about how Python works.
If you know Python it is very clear. So if it's confusing, you
wrongly taught Python (I myself was in this situation)

The simplification idea is to coerce Python to use patterns forged elsewhere. 
The tools are here if you wish to use it.

But, specifically pointing a pattern for it and adding additional layers to make it
work is an enforcement of the main function. Something python is not bound to
and does not need to run.

Kind Regards,

Abdur-Rahmaan Janhangeer
github
Mauritius
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@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/VHZK76RSXE3WIL2ZJ75WHCZ5OWQPE2QL/
Code of Conduct: http://python.org/psf/codeofconduct/