We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Python Unplugged: Mining for Hidden 'Batteries

Formal Metadata

Title
Python Unplugged: Mining for Hidden 'Batteries
Title of Series
Number of Parts
56
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Python prides itself on its 'batteries included' philosophy, but beyond the well-trodden modules lie hidden gems awaiting discovery. This talk ventures into the depths of the Python standard library to unearth lesser-known features from itertools, collections, functools, typing and more. All of these tools are already built into every standard python installation and no "(uv) pip install" is necessary. Many if not all of those are likely already known to old fashioned pythonistas, but for beginners (1-2years) there will be something new to learn, while for intermediate python developers there might be at least a few more gems to discover. By delving into these underutilized modules, attendees will gain a richer understanding of Python's built-in capabilities and learn how to write more pythonic code. 00:00 Introduction 05:30 Chapter 1: Fetching data 05:42 urllib 06:48 TypedDict 09:02 Batching 09:44 islice 11:10 batched 11:50 DictWriter 15:32 Chapter 2: Cleaning data 17:22 pairwise 19:16 chain 22:20 ChainMap¹ 23:36 Multiple Context Managers 25:54 Doctest 27:44 yield from 29:44 misusing return value in generators 33:03 NamedTuple² 33:06 Chapter 3: Processing data 34:51 defaultdict 36:28 Counter 39:55 groupby 43:10 reduce / tee Corrections 22:21 ¹itertools.ChainMap is wrong: collections.ChainMap is right 33:06 ²We also need to yield one more time at the end for the case, where the last books are lost books. Maybe even yield namedtuple(book: Book, lost: bool)