example-code-2e/02-array-seq
2021-01-31 22:48:38 +01:00
..
.gitignore ch02: created notebook 2019-04-06 11:34:18 -03:00
array-seq.ipynb ch02: automated tests 2019-11-20 20:19:50 -03:00
bisect_demo.py Modernize code to Python 3.6+ and some cleanup 2021-01-31 22:48:38 +01:00
bisect_insort.py Modernize code to Python 3.6+ and some cleanup 2021-01-31 22:48:38 +01:00
listcomp_speed.py Modernize code to Python 3.6+ and some cleanup 2021-01-31 22:48:38 +01:00
metro_lat_long.py Modernize code to Python 3.6+ and some cleanup 2021-01-31 22:48:38 +01:00
README.md ch02: automated tests 2019-11-20 20:19:50 -03:00
slice-assign.rst ch02: created notebook 2019-04-06 11:34:18 -03:00
test.sh ch02: automated tests 2019-11-20 20:19:50 -03:00

An Array of Sequences

Sample code for Chapter 2 of Fluent Python 2e by Luciano Ramalho (OReilly, 2020)

Running the tests

Doctests

Use Pythons standard doctest module, for example:

$ python3 -m doctest bisect_demo.py -v

Jupyter Notebook

Install pytest and the nbval plugin:

$ pip install pytest nbval

Run:

$ pytest --nbval