Copyright © 2005-2009 Shalabh Chaturvedi
About This Book
Explains Python new-style objects:
what are
<type 'type'>and<type 'object'>how user defined classes and instances are related to each other and to built-in types
what are metaclasses
New-style implies Python version 2.2 and upto and including 3.x. There have been some behavioral changes during these version but all the concepts covered here are valid. The system described is sometimes called the Python type system, or the object model.
This book is part of a series:
Python Types and Objects [you are here]
This revision:
Discuss
| Latest version
| Cover page
Author: shalabh@cafepy.com
Table of Contents
List of Figures
- 1.1. A Clean Slate
- 2.1. Chicken and Egg
- 2.2. Some Built-in Types
- 2.3. User Built Objects
- 3.1. The Python Objects Map
- 4.1. Relationships
- 4.2. Transitivity of Relationships
List of Examples
- 1.1. Examining an integer object
- 2.1. Examining
<type 'object'>and<type 'type'> - 2.2. There's more to
<type 'object'>and<type 'type'> - 2.3. Examining some built-in types
- 2.4. Creating new objects by subclassing
- 2.5. Creating new objects by instantiating
- 2.6. Specifying a type object while using
classstatement - 3.1. More built-in types
- 3.2. Examining classic classes