|
|
abc.ABC: abstract properties and classmethods, in the right order
|
Easy
|
Primitives
|
|
|
|
Accept broad, return narrow: group_by and merge_counts
|
Medium
|
Primitives
|
|
|
|
A Fetcher Protocol three implementations can satisfy
|
Medium
|
Primitives
|
|
|
|
A @final rate limiter
|
Easy
|
Primitives
|
|
|
|
A generic Result[T, E]
|
Medium
|
Primitives
|
|
|
|
Amortise cents without mixing up the units
|
Medium
|
Primitives
|
|
|
|
Annotated: metadata the type checker deliberately ignores
|
Medium
|
Framework
|
|
|
|
A rate limiter you can test without sleeping
|
Hard
|
End-to-End
|
|
|
|
A recursive Json alias, depth and flatten
|
Medium
|
Primitives
|
|
|
|
A registry that does not prevent collection
|
Medium
|
Primitives
|
|
|
|
asdict() and astuple(): the deep-copy tax
|
Hard
|
Framework
|
|
|
|
assert_never and the event that was never handled
|
Medium
|
Primitives
|
|
|
|
Async iterators: the paginator you can actually close
|
Medium
|
Primitives
|
|
|
|
A typed factory fixture
|
Hard
|
Primitives
|
|
|
|
Auditing a library for import-time side effects
|
Hard
|
Framework
|
|
|
|
Auditing the Any surface of a module
|
Medium
|
Framework
|
|
|
|
Bare except, blind except Exception, and where to catch
|
Medium
|
Primitives
|
|
|
|
Batched async stream: never yield inside a cancel scope
|
Hard
|
End-to-End
|
|
|
|
BoundedCounter: check-then-act under 64 threads
|
Medium
|
Primitives
|
|
|
|
Bounds versus constraints: clamp and dedupe
|
Hard
|
Framework
|
|
|
|
cache: memoised edit distance behind a validated wrapper
|
Medium
|
Primitives
|
|
|
|
Callback protocols: closing the Callable[..., Any] hole
|
Medium
|
Framework
|
|
|
|
Capstone: the upload that cannot be misused
|
Hard
|
End-to-End
|
|
|
|
ChainMap: resolve config and keep the provenance
|
Medium
|
Primitives
|
|
|
|
ClassVar, field(), and the counter that must reset
|
Easy
|
Primitives
|
|
|
|
Coerce to int at an untyped boundary
|
Medium
|
Primitives
|
|
|
|
contextmanager: temporarily patch an attribute, and put it back
|
Medium
|
Primitives
|
|
|
|
Counter: top n-grams with deterministic ties
|
Easy
|
Primitives
|
|
|
|
Dataclasses: slots, frozen, order
|
Easy
|
Primitives
|
|
|
|
@dataclass is a code generator: what it emits
|
Easy
|
Primitives
|
|
|
|
dataclass_transform (PEP 681): making your own decorator type-checkable
|
Hard
|
Framework
|
|
|
|
defaultdict: group rows, hand back a plain dict
|
Easy
|
Primitives
|
|
|
|
Deprecating public API: @warnings.deprecated
|
Medium
|
Framework
|
|
|
|
deque: rolling median and the maxlen narrowing
|
Medium
|
Primitives
|
|
|
|
Does this version satisfy this specifier?
|
Medium
|
Primitives
|
|
|
|
Every import cycle, deterministically
|
Hard
|
Framework
|
|
|
|
Exception chaining: raise ... from
|
Medium
|
Primitives
|
|
|
|
ExceptionGroup, split() and except*
|
Hard
|
Primitives
|
|
|
|
Exception hierarchies as API design
|
Medium
|
Primitives
|
|
|
|
Exhaustive matching with assert_never
|
Hard
|
End-to-End
|
|
|
|
Failure aggregation over batches
|
Medium
|
End-to-End
|
|
|
|
Flag: a permission mask that prints, iterates and refuses bad bits
|
Medium
|
Primitives
|
|
|
|
Flatten a union at runtime
|
Easy
|
Framework
|
|
|
|
Flattening a dependency group
|
Medium
|
Primitives
|
|
|
|
Forbidden import chains, with the route
|
Hard
|
Framework
|
|
|
|
Generic dataclasses, Self, and the covariance question
|
Hard
|
Framework
|
|
|
|
Generic partition and chunk
|
Medium
|
Primitives
|
|
|
|
groupby: summarise rows without losing half of them
|
Medium
|
Primitives
|
|
|
|
heapq: a priority queue that is FIFO among equal priorities
|
Medium
|
Primitives
|
|
|
|
hot_functions: the column you sort by is the answer you get
|
Medium
|
Framework
|
|