<br>
Hi all,<br>
<br>
was looking at references  in python...<br>
>>> a = 10<br>
>>> b = a<br>
 >>> id(a)<br>
153918788<br>
>>>id(b)<br>
153918788<br>
<br>
where a and b point to the same id. now is this id an address ? <br>
can one dereference a value based on address alone in python?<br>
is id similar to the address of a variable or a class ? <br>
<br>
read abt buffers as a refernce to a buffer object. <br>
actually i tried passing list and dict types to buffer function, but only with string type i could createa buffer reference,<br>
>>>y = 'GATCGTACC'<br>
>>>x = buffer(y, 0,8)<br>
>>> x<br>
<read-only buffer for 0xbf4cd3b8, size 8, offset 2 at 0xbf4cf0e0><br>
>>>print x<br>
TCGTACC<br>
>>> id(y)<br>
-1085484104<br>
>>> id(x)<br>
-1085476384<br>
<br>
now the ids of y and x are not the same - why ? <br>
In which situatons are buffers used against the strings ? <br>
can i create a write buffer instead of readonly buffer ?<br>
what exactly are buffer object types ? and how can i instantiate them ? <br>
<br>
regards,<br>
KM<br>
<br>