Message91731
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. |
|
Date |
User |
Action |
Args |
2009-08-19 14:02:16 | lemburg | set | recipients:
+ lemburg, loewis, amaury.forgeotdarc, vstinner, Arfrever |
2009-08-19 14:02:12 | lemburg | link | issue6697 messages |
2009-08-19 14:02:11 | lemburg | create | |
|