2014-02-01 22:00:41 -05:00
|
|
|
print(id(1) == id(2))
|
|
|
|
print(id(None) == id(None))
|
2014-02-03 17:50:22 -05:00
|
|
|
# This can't be true per Python semantics, just CPython implementation detail
|
|
|
|
#print(id([]) == id([]))
|
2014-02-02 08:38:21 -05:00
|
|
|
|
|
|
|
l = [1, 2]
|
|
|
|
print(id(l) == id(l))
|
|
|
|
|
|
|
|
f = lambda:None
|
|
|
|
print(id(f) == id(f))
|