copying a string???

Fredrik Lundh fredrik at pythonware.com
Thu Aug 22 09:17:25 EDT 2002


Joe Connellan wrote:

> I have a function that alters the value of a string (written in C). (is
> that bad?)

yes.

don't do that.

to quote the documentation, "the [contents of a string] must not
be modified in any way, unless the string was just created using
PyString_FromStringAndSize(NULL, size)."

see the "extending and embedding" and "python/c api" documents
for more info.

</F>





More information about the Python-list mailing list