Premium Only Content

Python Tips and Hints #1 - Dunder functions __main__ and __name__
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/lexical_analysis.html?highlight=dunder
Special considerations for __main__
https://docs.python.org/3/reference/import.html?highlight=__main__
Dunder in classes
https://docs.python.org/3/library/dataclasses.html?highlight=dunder
Top level code discussion and use: __name__ and __main__
https://docs.python.org/3/library/__main__.html?highlight=__main__
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/9781449308094/
Packet Guide to Routing and Switching: https://www.oreilly.com/library/view/packet-guide-to/9781449311315/
Packet Guide to Voice over IP: https://www.oreilly.com/library/view/packet-guide-to/9781449339661/
Network Engineering Fundamentals: https://www.oreilly.com/videos/network-engineering-fundamentals/9781491932643/
Advanced Network Engineering: https://www.oreilly.com/videos/advanced-network-engineering/9781491952559/
Virtualization, Networking, and Storage: https://www.oreilly.com/videos/virtualization-networking-and/9781491970478/
-
1:14:40
Mark Kaye
4 hours ago🔴 Trump FUMES As Police Abandon Chicago At Pritzker's Orders
5.76K15 -
UPCOMING
Film Threat
17 hours agoVERSUS: THE SMASHING MACHINE BOMBS + 007 EMASCULATED ON AMAZON | Film Threat Versus
694 -
UPCOMING
The Nunn Report - w/ Dan Nunn
47 minutes ago[Ep 763] The Democrat Death Cult – Party of Violence| Judicial Coup & Real Insurrection
22 -
UPCOMING
Owen Shroyer
7 minutes agoOwen Report - 10-06-2025 - Debut Episode Of Your New Favorite Talk Show
-
56:24
DeVory Darkins
3 hours ago $29.67 earnedFederal Judge issues shocking order against Trump as Chicago Mayor pulls insane stunt
71.1K128 -
1:24:59
Sean Unpaved
3 hours agoPoll Plunge & Mile-High Mayhem: Texas & Penn State Crash, Sunday's Fireworks, & Broncos Stun Eagles'
26.7K1 -
9:24
Ken LaCorte: Elephants in Rooms
1 day ago $0.56 earnedThe secret of Indian store owners
3.74K2 -
8:30
Millionaire Mentor
1 day agoJames Comey PANICS After Pam Bondi Reveals What’s Coming Next
3.92K9 -
LIVE
Jeff Ahern
1 hour agoMonday Madness with Jeff Ahern
133 watching -
8:07
Michael Heaver
4 hours agoBritain CANNOT Afford To Ignore This
5.92K2