Premium Only Content

Fun with Python's Newer Tools -fun with python's newer tools
Fun with Python's Newer Tools
Spend ten minutes each learning to work with Counters, named tuples, new string formatting, and the LRU cache. Learn the basic API, see how it works under the hood, enjoy a simple example, and then have fun pushing it to the limit in interesting ways.
Look at how a Counter is implemented. See a simple word count example. Use a counter for unittests. Implement a sparse matrix.
Show how named tuples are created, combined, subclassed, and extended. See how to implement an Enum class and how to create default values.
Learn the basics of the new string formatting syntax. See how to use it for templating.
Show everyday uses for an LRU cache, look at the underlying implementation, and see how to use it to trivially solve a dynamic programming problem.
-
1:14:22
Jeff Ahern
5 hours ago $9.85 earnedThe Sunday Show with Jeff Ahern
54.3K28 -
16:37
Professor Nez
6 hours ago🚨Internet MELTS DOWN over JD Vance & Trump BREAKING the Democrats!
53.7K156 -
18:40
itsSeanDaniel
8 hours agoPiers Morgan CALLED OUT and HUMILIATED by Andrew Tate
62.3K272 -
LIVE
Times Now World
2 days agoLIVE: "ON CAM: How the Charlie Kirk Shooter ESCAPED – Shocking New Footage Revealed!"
323 watching -
1:45:51
Game On!
1 day ago $11.49 earnedWise Guys Reveal NFL Week 2 BEST BETS Now
95.7K8 -
26:57
Robbi On The Record
2 days agoMouth Breathing Is Why You’re Exhausted | with Dr. Melanie Silvestrini
69.1K6 -
LIVE
Total Horse Channel
10 hours ago2025 Reno Snaffle Bit Futurity | Sunday Finals
88 watching -
40:44
SouthernbelleReacts
7 days ago $4.35 earned“Event Horizon (1997) Reaction | Hellraiser in Space with Sam Neill & Laurence Fishburne”
54.6K5 -
10:49
Artur Stone Garage
3 days ago $2.88 earnedI Spent $2000 on My Turbo Honda Civic Build (Before & After)
49.9K13 -
0:44
Danny Rayes
23 hours ago $4.87 earnedDid Someone Know It Was Going To Happen?
47.2K11