[Python-Dev] PyErr_SafeFormat
Fredrik Lundh
Fredrik Lundh" <effbot@telia.com
Fri, 14 Jul 2000 19:54:43 +0200
guido wrote:
> Need some more analysis of what format codes are actually used,
> and support for %.200s which is currently used often.
possibly stupid idea: would it make sense to add custom
formatting codes, like:
%S =3D> char*, string, clip if excessively long
%T =3D> PyObject*, show name of type, clip if excessively long
where "clip" means:
truncate at 80 characters, and add "..." to indicate
that the string was truncated.
this covers most of the places where %.\d+s are used (in
the Python core, at least...)
</F>