[issue7330] PyUnicode_FromFormat segfault

Eric Smith report at bugs.python.org
Wed Jul 28 16:59:26 CEST 2010

Eric Smith <eric at trueblade.com> added the comment:

I think under the "we're all consenting adults" doctrine that it should be allowed. If you really want that behavior, why force the char*/%s dance at each call site when it's easy enough to do it in one place? I don't think anyone supplying a width would really be surprised that it would truncate the result and possibly break round-tripping through repr.

Besides, it's allowed in pure python code:
>>> '%.5r' % object()


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list