Do the `if __name__ == "__main__": ` like idioms have a name of design pattern? Do the `if __name__ == "__main__": ` like idioms have a name of design pattern? ruby ruby

Do the `if __name__ == "__main__": ` like idioms have a name of design pattern?


In Perl, this pattern is known as a modulino. I believe the term was coined by brian d foy in his book Mastering Perl. I don't often see the name applied for languages other than Perl, but it does happen.

Edit to add: the name goes back earlier than that. Here's an article from 2004 that uses the term.