[Python-Dev] Const-correctness in C-API Object Protocol

"Martin v. Löwis" martin at v.loewis.de
Wed Feb 23 00:43:29 CET 2011


> Even if it is eventually decided not to backport those patches to 2.7,
> it would be nice if the documentation could be updated to indicate
> that strings passed to those functions won't be modified, so that API
> users like myself can feel a little safer when passing literals in,
> without having to trawl through the interpreter source to see if the
> arguments are modified.

Can you provide the proper patches?

In writing them, you can assume that Python never modifies parameters,
except when it is already documented that it does.

Regards,
Martin


More information about the Python-Dev mailing list