summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/builtin_id.py
blob: 1d617c4ccb1b0b5822f501d48b5cf9d1bc3d586d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
print(id(1) == id(2))
print(id(None) == id(None))
# This can't be true per Python semantics, just CPython implementation detail
#print(id([]) == id([]))

l = [1, 2]
print(id(l) == id(l))

f = lambda:None
print(id(f) == id(f))