Python Internals: Objects and Memory

flowchart TD
1["1: Names, objects and identity"]
2["2: Mutation and repeated references"]
3["3: The toy heap and the object header"]
4["4: Reference counts"]
5["5: Cycles and the garbage collector"]
6["6: Build a toy heap with reference counts"]
1 --> 2
1 --> 3
2 --> 3
1 --> 4
3 --> 4
3 --> 5
4 --> 5
3 --> 6
4 --> 6
classDef locked fill:var(--bs-secondary-bg-subtle),stroke:var(--bs-secondary-border-subtle),color:var(--bs-secondary-text-emphasis)
classDef open fill:var(--bs-success-bg-subtle),stroke:var(--bs-success-border-subtle),color:var(--bs-success-text-emphasis)
classDef landed fill:var(--bs-primary-bg-subtle),stroke:var(--bs-primary-border-subtle),color:var(--bs-primary-text-emphasis)
class 1 open
class 2 open
class 3 open
class 4 open
class 5 open
class 6 open
click 1 "/learn/python-internals/01-names-objects-and-identity"
click 2 "/learn/python-internals/02-mutation-and-repeated-references"
click 3 "/learn/python-internals/03-the-toy-heap-and-the-object-header"
click 4 "/learn/python-internals/04-reference-counts"
click 5 "/learn/python-internals/05-cycles-and-the-garbage-collector"
click 6 "/learn/python-internals/06-build-a-toy-heap-with-reference-counts"

Notes

1: Names, objects and identity 2: Mutation and repeated references 3: The toy heap and the object header 4: Reference counts 5: Cycles and the garbage collector 6: Build a toy heap with reference counts