Python programs operate on objects with explicit input, ownership and failure contracts.
Learning roadmap
This section contains 14 written lessons or quiz banks. Programs are verified on CPython 3.14.6. Standard-library lessons target 3.11+ syntax; lessons using data, web, machine-learning or testing packages state their tested dependencies separately. Framework programs use local test clients, not a deployed service. Read the stated limits before adapting a fixture into an application.
Trace object identity
Read the contract, run its program and inspect the failure case.
Execution timing
Read the contract, run its program and inspect the failure case.
Explain failure and lookup traces
Read the contract, run its program and inspect the failure case.
- Python exception interview: chained causes and a finally return that hides failure
- Python object lookup interview: descriptor precedence before instance state
- Python concurrency interview: cancellation must still run cleanup
Read transaction lifetime
Read the contract, run its program and inspect the failure case.
Cancellation and permit ownership review
Read the contract, run its program and inspect the failure case.
Mutation and suppression reasoning
Read the contract, run its program and inspect the failure case.
- Python context manager exit: returning true can hide a failure
- Python interview: mutating a hash key breaks dictionary lookup assumptions
- Python interview: a return from finally replaces a pending exception
Scope and exception order
Read the contract, run its program and inspect the failure case.
- Python interview: try else runs only after the try body succeeds
- Python interview: a comprehension has its own loop-variable scope
Dictionary equality traces
Read the contract, run its program and inspect the failure case.
Container hash trace
Read the contract, run its program and inspect the failure case.
Continue learning
Move between tutorial, collections, advanced material and practice using the subject tabs. The sidebar changes with each section; related examples keep one canonical lesson URL.
