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.
-
4:34:26
Akademiks
7 hours agoICEMAN EPISODE 3
148K -
2:04:10
Inverted World Live
9 hours agoThe Robots Are Here | Ep. 103
61.6K16 -
1:21:53
Man in America
17 hours agoInflation, Debt & War: The 2032 Crash Cycle Is Here—Nations Will FALL w/ Martin Armstrong
58.1K20 -
1:53:48
Adam Does Movies
16 hours ago $3.13 earnedTalking Movies + Ask Me Anything - LIVE
24.1K3 -
2:55:43
TimcastIRL
8 hours agoTrump DOJ To Ban Trans People From Owning Guns After Catholic School Shooting | Timcast IRL
187K119 -
3:21:36
The Quartering
7 hours agoBaldur's Gate 3 First Playthrough!
50K8 -
6:34:42
Rallied
10 hours ago $9.03 earnedWarzone Solo Challenges
80K2 -
57:40
MattMorseTV
9 hours ago $11.99 earned🔴Trump just SHATTERED the RECORD.🔴
57.1K98 -
43:39
WickedVirtue
6 hours agoLate Night Spooky Plays
41.7K5 -
2:04:02
Glenn Greenwald
10 hours agoTrump and Rubio Apply Panama Regime Change Playbook to Venezuela; Michael Tracey is Kicked-Out of Epstein Press Conference; RFK Senate Hearing | SYSTEM UPDATE #508
114K146