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 <4A8C05E2.8060101@egenix.com>
In-reply-to <1250688674.95.0.181666584632.issue6697@psf.upfronthosting.co.za>
Content
Amaury Forgeot d'Arc wrote:
> 
> Amaury Forgeot d'Arc <amauryfa@gmail.com> 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
altogether.

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
developers.

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.
History
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