r/pythontips • • Jun 04 '19

Python Tutorials: If __name__ == "__main__" (video):

27 Upvotes

6 comments sorted by

4

u/abdoulsn Jun 04 '19

I need this one.

1

u/hugthemachines Jun 05 '19

Nice video. I think perhaps the names of the python files make is a bit confusing for those who do not know how it works. I am not sure, though since these days I know how it works.

There is a little detail that is repeated several times in this video and it is not important for the tutorial. If you want to say a script was executed, it is called the script was run, not the script was ran.

1

u/Moondra2017 Jun 05 '19

What's funny is that while I was shooting the video, the script was "ran" sounded funny, and I actually tried looking it up and found a forum discussing it, but the nuance of the convo was a little different from my situation, so I just let it be.

Thanks for the tip though!

1

u/hugthemachines Jun 06 '19

I had a feeling that it sounded funny, to be sure I googled it. I found too much stuff and I was not certain anyway. So I asked my son who goes to school and when he agreed with me, I felt certain my first feeling was right. :-)

1

u/HostileHarmony Jun 05 '19

Nice video, really concise and to the point. Great explanation.

1

u/TotesMessenger Jun 05 '19

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)