Browse OOP reference
Objects and behaviour

What is an object?

On this page

An object is a program value that can participate in operations and, in languages such as Python, has an identity. Some objects carry mutable state. Others, including Python strings, keep the same value throughout their lifetime. An empty list is already an object before anyone appends an element.

Worked example

Python
buffer = bytearray(b"AB")
alias = buffer
alias[0] = ord("Z")
assert buffer == b"ZB"
assert type(buffer) is bytearray

Python data model

Explore class relationships in the OOP Playground

What are value objects?What is the object-relational impedance mismatch?What are object-oriented databases?

All OOP questions

Search ObjectFAQ