Skip to content
Unit 28 of 28

References and further reading

Contents · 6

The primary source for everything in this course is the official Python documentation. When a unit and the docs disagree, the docs win. The docs are versioned, so make sure you are reading the version you run.

Where to go next

If you have worked through the units and built the capstone, you can write, test and package a Python program that reads files, calls web APIs, processes data and runs work concurrently. That is enough to be useful on a real project. Here are some recommendations for what to do next. Pick the ones that fit your goals.

  • Build something of your own. A small tool you use every week teaches more than another course. Some ideas: a command line tool that tidies a downloads folder, a script that turns a bank export into a monthly report, or a client for a public API you like.
  • Put your code under version control. This course does not teach Git. Learn its basics next (commit, branch, push, pull request), then run your tests automatically on every push, as described in Testing with pytest. The Git documentation includes a free book.
  • Go deeper into the language. Good next topics are type hints in depth (generics, TypedDict, checking a whole project with mypy or Pyright), the debugger (breakpoint() and the pdb module), profiling with cProfile, and the data model that Fluent Python covers.
  • Pick a direction. For web services, look at a web framework such as FastAPI, Flask or Django, and learn SQL. For data work, continue from Working with data with more pandas, plotting and Jupyter. For automation, explore the modules in A tour of the standard library further.
  • Read other people's code. Much of the standard library is readable Python. Run import json; print(json.__file__) to see where a module lives, then open it and see how it is put together.
  • Come back to the appendices. Idiomatic Python and Practice problems are good revision before an interview or after a break.

Official documentation

ResourceWhat it is for
The Python TutorialThe language, step by step, from the people who make it
The Python Standard LibraryReference for every built in function, type and stdlib module
The Python Language ReferenceThe exact rules: syntax, the data model, the import system
What's New in PythonWhat changed in each release. Read it when you upgrade
Python HOWTOsFocused guides: Unicode, sorting, logging, regular expressions, descriptors, functional programming
GlossaryPrecise definitions of iterable, hashable, context manager, and more
Python Packaging User GuideInstalling packages, virtual environments, pyproject.toml, publishing
Python Developer's Guide: versionsWhich Python versions are supported, and until when

Python Enhancement Proposals (PEPs) mentioned in this course

The table lists the PEPs that the units cite by number, and a few more that define features the units teach.

PEPTopicUnit
1What a PEP is and how the process worksIntroduction to Python
8Style guide for Python codeThroughout
13How the Python project is governedIntroduction to Python
20The Zen of PythonIntroduction to Python
257Docstring conventionsFunctions
263 · 3120Source file encodings; UTF-8 as the defaultText, bytes and Unicode
420Namespace packages without __init__.pyModules and packages
427The wheel package formatPackaging and tooling
465The @ operator for matrix multiplicationOperators and expressions, Working with data
484Type hintsFunctions, Classes and objects
517 · 518Build back ends and the [build-system] tablePackaging and tooling
572Assignment expressions (:=)Operators and expressions
597EncodingWarning for implicit encodingsText, bytes and Unicode
602Annual release cycleIntroduction to Python
615zoneinfo: IANA time zones in the stdlibA tour of the standard library
621Project metadata in pyproject.tomlPackaging and tooling
634 · 636Structural pattern matching (match) and its tutorialControl flow
639Licence expressions in package metadataPackaging and tooling
654Exception groups and except*Errors and exceptions
668Externally managed environmentsSetting up Python, Packaging and tooling
686UTF-8 mode on by defaultText, bytes and Unicode
701The formal grammar of f-strings, including reuse of the same quotes inside oneStrings and text formatting
703 · 779Free threaded CPython, and its supported statusIntroduction to Python, Concurrency
735Dependency groups in pyproject.tomlPackaging and tooling
744The experimental JIT compilerIntroduction to Python
750Template stringsStrings and text formatting
751A standard lock file format (pylock.toml)Packaging and tooling
758except and except* without parenthesesErrors and exceptions
765Control flow in finally blocksErrors and exceptions
773The Python install manager for WindowsSetting up Python
810Explicit lazy importsIntroduction to Python, Values, names and types
3131Non ASCII identifiersValues, names and types

Tools and libraries

Books

  • Fluent Python, Luciano Ramalho (O'Reilly). Once you are comfortable with this course, the best next step for writing Python that uses the language's full data model.
  • Effective Python, Brett Slatkin (Addison-Wesley). Short, numbered items of advice, each with a worked example.
  • Automate the Boring Stuff with Python, Al Sweigart (No Starch Press; free to read online). Practical scripts for files, spreadsheets, PDFs and the web.
  • Think Python, Allen B. Downey (O'Reilly; free to read online). A gentle introduction to programming that uses Python.

Look for the latest edition of each book. The first editions were written for much older Python versions.

Credits

  • Facts about the language and the standard library were checked against the official Python documentation, © Python Software Foundation. The explanations and examples were written for this course, and no documentation text is reproduced.
  • The topic selection of the Python cheat sheet was inspired by Laurent Pointal's Python 3 Memento, licensed CC BY 4.0. The text and examples here are original.
  • The crime data lab in Files and data formats and Working with data is modelled on the City of Chicago's public dataset of reported crimes from 2001 to the present (Chicago Data Portal). The small samples shown in the units are invented. If you download the real dataset, follow the portal's terms of use.