Mastery
Python · Expert - architecture, internals and edge cases
- Type hints and dataclasses: typing modern Python seriouslyUnderstand what annotations actually do at runtime, and get the most out of dataclasses with frozen, slots and default_factory.
- Protocols and special methods: __repr__, __eq__, context managersMaster Python's object model: the __eq__/__hash__ contract, the NotImplemented value, context managers and structural typing with Protocol.
- Async with asyncio: coroutines, await, gatherUnderstand asyncio's cooperative concurrency: lazy coroutines, suspension points, gather, TaskGroup and the pitfalls of blocking calls.
- Performance: profiling, GIL, generators vs lists, memory pitfallsMeasure before you optimize: timeit and cProfile, what the GIL really blocks, the frugality of generators and the memory pitfalls of strings and slices.
- Testing with pytest: fixtures, parametrization, best practicesStructure robust tests with pytest: fixture injection, yield-based teardown, table-driven parametrization and the pitfalls of broad scopes.