example-code-2e/11-pythonic-obj
2021-11-12 11:33:12 -03:00
..
private sync with O'Reilly Atlas 2021-06-26 13:42:28 -03:00
mem_test.py updated from Atlas 2021-08-07 00:44:01 -03:00
patterns.py updated from Atlas 2021-08-07 00:44:01 -03:00
README.md ch11: updated README.md 2020-06-09 01:20:49 -03:00
slots.rst updated from Atlas 2021-08-07 00:44:01 -03:00
vector2d_v0.py ch11: sample code 2020-06-09 01:16:38 -03:00
vector2d_v1.py ch11: sample code 2020-06-09 01:16:38 -03:00
vector2d_v2_fmt_snippet.py ch11: sample code 2020-06-09 01:16:38 -03:00
vector2d_v2.py ch11: sample code 2020-06-09 01:16:38 -03:00
vector2d_v3_prophash.py 2e reviewed manuscript 2021-11-12 11:33:12 -03:00
vector2d_v3_slots.py 2e reviewed manuscript 2021-11-12 11:33:12 -03:00
vector2d_v3.py 2e reviewed manuscript 2021-11-12 11:33:12 -03:00

A Pythonic Object

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

The memtest.py script takes a module name in the command line and loads it. Assuming the module defines a class named Vector, memtest.py creates a list with 10 million instances, reporting the memory usage before and after the list is created.