Hello all!
I was wondering if there could be some sort of alternative to indicating that a script is meant to be run directly that does not force beginners to wrap their head around magic methods and how Python works under the hood. Purely from cursory overview of beginner-to-intermediate educational content available for free, the idea of using magic methods for this specific purpose does seem to be the biggest source of confusion for people new to Python - video explaining what this bit of code does by Corey Schafer is sitting on 1,7 million views (one of his best), and video explaining the same concept by mCoding is at 865 thousand views (his most viewed video ever). Question asking what this idiom does on StackOverflow has more than 7600 upvotes, and more than 3200 bookmarks (second most upvoted Python question). Furthermore, this fits in line with introduction of dataclasses, which is basically a way of declaring classes without writing boilerplate magic methods.
How about instead of:
if __name__ == "__main__":
main()
Python gets this slightly more readable alternative that does the exact same thing:
if is_main():
main()
What are your thoughts about this proposal?