Skip to content

Narrowing practice problems in Python

Difficulty:
Category:
Tag:

Showing 11 of 11

Status Title Difficulty
A generic Result[T, E] Medium
A recursive Json alias, depth and flatten Medium
Coerce to int at an untyped boundary Medium
Exception hierarchies as API design Medium
Iterator, Iterable, Generator, Sequence — and what the annotation promises Medium
Migrating a Fork-Dependent Codebase to Forkserver Hard
Narrowing without the truthiness trap Medium
Replacing cast() with a TypeIs predicate Medium
runtime_checkable is presence, not a signature Hard
The walrus operator, tastefully Medium
TypeIs, TypeGuard, and a predicate that lies Hard