An ordinary object, I can use
o.__repr__()
to see something like
'<__main__.A object at 0x9d78fec>'
But, say, a Django User just returns
<User:bob>
How can I see the actual address of one of these, or compare whether two such model-objects are actually the same object or not?
id()will return the identity of the object (generally implemented as the address), which is guaranteed unique for two objects which exist at the same point in time. However the obvious way to check whether two objects are identical is to use the operator explicitely designed for this:isie.