In this first Python hints video we will talk about the difference between building a program using def main() and one using code like:
if __name__=="__main__"
We will go through a couple of code examples and show you to reference material for further reading. The links are below.
Lexical analysis
https://docs.python.org/3/reference/l...
Special considerations for _main_
https://docs.python.org/3/reference/i...
Dunder in classes
https://docs.python.org/3/library/dat...
Top level code discussion and use: _name_ and _main_
https://docs.python.org/3/library/__m...
And since the channel is mostly about networking ... books and other products for networkers
Packet Guide to Core Network Protocols: https://www.oreilly.com/library/view/...
Packet Guide to Routing and Switching: https://www.oreilly.com/library/view/...
Packet Guide to Voice over IP: https://www.oreilly.com/library/view/...
Network Engineering Fundamentals: https://www.oreilly.com/videos/networ...
Advanced Network Engineering: https://www.oreilly.com/videos/advanc...
Virtualization, Networking, and Storage: https://www.oreilly.com/videos/virtua...
Watch video Python Tips and Hints #1 - Dunder functions __main__ and __name__ online without registration, duration hours minute second in high quality. This video was added by user Bruce Hartpence - Learning Networks 15 October 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 122 once and liked it 3 people.