References & Further Reading
References
- L. Ramalho, Fluent Python, O'Reilly Media, 2nd ed., 2022
The definitive guide to Python's data model and advanced language features. Chapters 1-2 on the data model and sequences are directly relevant to this chapter.
- J. VanderPlas, Python Data Science Handbook, O'Reilly Media, 2nd ed., 2023
Covers the scientific Python ecosystem from IPython through NumPy, Pandas, and Matplotlib. Chapter 1 on IPython is a good complement to our environment setup.
- D. Beazley and B. K. Jones, Python Cookbook, O'Reilly Media, 3rd ed., 2020
Practical recipes for Python programming. The chapters on data structures, iterators, and generators provide deeper treatment of topics covered here.
- Python Software Foundation, Python 3.11 Documentation β Data Model, 2023. [Link]
The authoritative reference for all dunder methods. Section 3.3 lists every special method with precise semantics.
- Anaconda, Inc., Conda User Guide, 2024. [Link]
Official documentation for conda environment management. The "Managing environments" section covers everything needed for reproducible scientific setups.
- N. J. Smith, PEP 465 β A Dedicated Infix Operator for Matrix Multiplication, 2014. [Link]
The proposal that introduced the `@` operator. The motivation section explains why `np.dot(A, B)` was insufficient and how the operator was designed for scientific computing.
Further Reading
Python internals and CPython implementation
A. Shaw, *CPython Internals*, Real Python, 2021
Goes under the hood of CPython to explain how dunder methods are dispatched, how dictionaries are implemented as hash tables, and why list append is amortized O(1). Useful if you want to understand *why* the performance characteristics are what they are.
Advanced itertools patterns
more-itertools library (https://more-itertools.readthedocs.io/)
Extends the standard itertools with 200+ additional recipes. Especially useful: `chunked` (batch processing), `peekable` (look-ahead iterators), and `windowed` (sliding windows).
Modern Python packaging
Python Packaging User Guide (https://packaging.python.org/)
The official guide for `pyproject.toml`, `src` layout, and editable installs. Chapter 4 of this book covers packaging in detail, but this is the reference to start with.
Type hints for scientific code
PEP 484 and the mypy documentation (https://mypy.readthedocs.io/)
Chapter 4 covers type annotations in depth. If you want to start adding type hints immediately, the mypy docs provide a practical tutorial.