(Feb-22-2017, 04:50 PM)Ofnuts Wrote: The difference between ids and addresses make me believe that the 'i' elements you get are already copies of the bytes in the sequence...No they are not copies,
id()
only return the object memory address.Everything in python is stored as reference.
>>> import sys >>> blist = list(b'\x76\x12\x0B\x08') >>> id(blist) 6114280 >>> sys.getsizeof(blist) 64 >>> blist[0] 118 >>> id(blist[0]) 1351010144 >>> sys.getsizeof(blist[0]) 14What is actually stored(the "pointer" itself of blist[0]) is something we cannot access or manipulate in any way.
blist[0] evaluates to a Python object(that's get a memory address) and that's all we can rely on.