micropython/tests/basics/builtin_id.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
226 B
Python
Raw Normal View History

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([]))
2014-02-02 13:38:21 +00:00
l = [1, 2]
print(id(l) == id(l))
f = lambda:None
print(id(f) == id(f))