example-code-2e/11-pythonic-obj/README.md

7 lines
357 B
Markdown
Raw Normal View History

2020-06-09 06:20:49 +02:00
# A Pythonic Object
2020-06-09 06:16:38 +02:00
Sample code for Chapter 11 of _Fluent Python 2e_ by Luciano Ramalho (O'Reilly, 2020)
2020-06-09 06:20:49 +02:00
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.