Python Tutorial: if __name__ == '__main__'
Video Statistics and Information
Channel: undefined
Views: 5,535
Rating: 4.8277512 out of 5
Keywords: if name == main, if __name__ == '__main__' python, python 3 tutorial, python tutorial, python 3, python, __name__ == __main__ python, __name__ == __main__
Id: Mauq4qCgsOk
Channel Id: undefined
Length: 5min 15sec (315 seconds)
Published: Thu Sep 12 2019
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
A rare example of boilerplate that could and should be excised from Python.
Why not simply:
TIL something :)
Huh, I always just make sure that stuff I want to import doesn't have any code that runs, just functions, and put tests elsewhere.