The chapter uses greek symbols α and β as the internal names of lists and dictionaries. Actually, all variables use internal names for their values. Python has a function id() that reveals the internal name of a variable.

1
2
3
>>> X = [True,False]
>>> id(X)
3075381068

The name turns out to be a number (like 3075381068). Readers familiar with C or C++ may have a mental model of computer memory, where a pointer is an index into the words or bytes of (virtual) memory. If you think in terms of pointers, 3075381068 looks like a pointer value. Whether it is a pointer or a key in a dictionary makes no difference (Python uses its own bytecode virtual machine, and we don't need to go into the details). The point is that we can explore some of these names using Python's id() function.


Internal Names

A = list(range(3))
B = [True]
C = [A,B]
print id(A), id(B), id(C)
print id(C[0]), id(C[1])
print id(C[0][1]), id(A[1])