Terminology

Every piece of data stored in a program is an object. Each object has an identity, a type, and a value.

For example, when you write a = 42, an integer object is created with the value of 42. You can view the identity of an object as a pointer to its location in memory. In this example, a is a name that refers to this specific location.

The type of an object (which is itself a special kind of object) describes the internal representation of the object as well as the methods and operations that it supports. When an object of a particular type is created, that object is sometimes called an instance of that type (although an instance of a type should not be confused with an instance of a user-defined class). After an object is created, ...

Get Python Essential Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.