references and buffer()
srikrishnamohan at gmail.com
Sun Oct 8 21:09:24 CEST 2006
in the CPython implementation, it's the address where the object is
> stored. but that's an implementation detail.
ok so can i point a vairiable to an address location just as done in C
>>> y = 'ATGCATGC'
>>> x = buffer(y)
<read-only buffer for 0xbf4cf0e0, size -1, offset 0 at 0xbf4cf240>
>>> print x
now even when i delete y, why is that x still exists ?
thats true even in the case of vairable assignment which states it a a
>>> a = 10
>>> b = a
i always thought if u modify the referred variable/buffer object it should
be reflected in the referenced variables/buffers objects . am i wrong ?
does it mean that references in python are not true references ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list