Skip to content
AITroveRead. Build. Understand.

Advanced Python

Operation contracts, checked Python programs and connected learning resources.

Python programs operate on objects with explicit input, ownership and failure contracts.

Learning roadmap

This section contains 40 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.

Deferred calls and cleanup

Read the contract, run its program and inspect the failure case.

Task and worker ownership

Read the contract, run its program and inspect the failure case.

Object protocols and lookup

Read the contract, run its program and inspect the failure case.

Processes, locks and async budgets

Read the contract, run its program and inspect the failure case.

Layout, lifetime and resource acquisition

Read the contract, run its program and inspect the failure case.

Class construction, grouped failures and execution context

Read the contract, run its program and inspect the failure case.

Declaration hooks, producer lifetime and narrowing ownership

Read the contract, run its program and inspect the failure case.

Suspension, cancellation and shared predicates

Read the contract, run its program and inspect the failure case.

Transferred cleanup and type protocols

Read the contract, run its program and inspect the failure case.

Async workers and cached state

Read the contract, run its program and inspect the failure case.

Buffered readers and deadlines

Read the contract, run its program and inspect the failure case.

Copying records without copying ownership

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.

Curriculum

Read the contract, run its program and inspect the failure case.

  1. 1Python dataclasses.replace: a new record can retain old mutable fields
Storage details