ctypes & strings

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Dec 28 03:44:29 CET 2008


En Sat, 27 Dec 2008 22:06:23 -0200, Aaron Brady <castironpi at gmail.com>  
escribió:
> On Dec 27, 2:03 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> wrote:
>> En Sat, 27 Dec 2008 10:54:32 -0200, Hendrik van Rooyen  
>> <m... at microcorp.co.za> escribió:
>>
>> > The c routine will actually break Python's normal string
>> > immmutability and give you back a changed ins.
>>
>> Hmmm, I don't think posting a potentially harmful example is actually a  
>> good idea...
>
> Hendrik is right, though.  The ctypes module allows us to break string
> immutability within Python code.

Ok, it *can* be done, but it's far from being a recommended practice...  
and I would never use such wizardry in production code.

-- 
Gabriel Genellina




More information about the Python-list mailing list