Skip to content

texmaxcode/koans_for_fluent_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koans for Fluent Python (inspired)

This repo is a test-driven koans style course for Python fluency: you run tests, they fail with a message, you implement small bits of code, and repeat.

This project is inspired by the kinds of topics commonly covered in advanced Python books (data model, functions, iterators, context managers, concurrency, typing), but all code and explanations here are original.

Requirements

  • Python 3.11+ recommended (works on 3.10+ if you adjust a few type hints).

Quick start

Run the koans:

python3 -m unittest -q

Run a specific file:

python3 -m unittest -q tests.test_01_data_model

How it works

  • Tests live in tests/.
  • Your implementations live in koans/answers/.
  • Each koan is a small concept. Read the failure message, then implement the requested behavior.

Learning path (current)

  1. Data model / dunder methods (__repr__, __iter__, __len__, etc.)
  2. Sequences and slicing
  3. Dictionaries, sets, and mappings
  4. Functions as objects; closures
  5. Decorators (simple + parameterized)
  6. Iterators, generators, yield from
  7. Context managers
  8. dataclasses and composition
  9. Protocols / structural typing (lightweight)
  10. Properties and validation
  11. Attribute access (__getattr__)
  12. Concurrency (threads/asyncio basics)

License

MIT. See LICENSE.

About

Koans for the book Fluent Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages