GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — example-code-2e/11-pythonic-obj at master · FerMatPy/example-code-2e

Expand file tree

/

11-pythonic-obj

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

11-pythonic-obj

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
private
private
 
 
README.md
README.md
 
 
mem_test.py
mem_test.py
 
 
patterns.py
patterns.py
 
 
slots.rst
slots.rst
 
 
vector2d_v0.py
vector2d_v0.py
 
 
vector2d_v1.py
vector2d_v1.py
 
 
vector2d_v2.py
vector2d_v2.py
 
 
vector2d_v2_fmt_snippet.py
vector2d_v2_fmt_snippet.py
 
 
vector2d_v3.py
vector2d_v3.py
 
 
vector2d_v3_prophash.py
vector2d_v3_prophash.py
 
 
vector2d_v3_slots.py
vector2d_v3_slots.py
 
 

README.md

A Pythonic Object

Sample code for Chapter 11 of Fluent Python 2e by Luciano Ramalho (O'Reilly, 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.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.