This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients Arfrever, amaury.forgeotdarc, lemburg, loewis, vstinner
Date 2009-08-19.14:02:11
SpamBayes Score 8.881784e-16
Marked as misclassified No
Message-id <>
In-reply-to <>
Amaury Forgeot d'Arc wrote:
> Amaury Forgeot d'Arc <> added the comment:
> Do you suggest to remove all usages of _PyUnicode_AsString() and
> _PyUnicode_AsStringAndSize()?

In the short-term, I suggest that all uses that do not check the
return value get replaced with a new API which implements a failsafe
return value strategy.

In the mid- to long-term, the APIs should probably be removed

They look a lot like the PyString APIs using the same names, but unlike
those APIs, they can fail, so the implied straight-forward conversion
of the PyString APIs to the above APIs gives a wrong impression to the

For error messages, I'd use the repr() of the objects - lone UTF-8
surrogates will not work since they cause issues further down the line
with debugging tools or even stderr terminal displays.
Date User Action Args
2009-08-19 14:02:16lemburgsetrecipients: + lemburg, loewis, amaury.forgeotdarc, vstinner, Arfrever
2009-08-19 14:02:12lemburglinkissue6697 messages
2009-08-19 14:02:11lemburgcreate