
May 13, 2006
1:23 p.m.
Georg Brandl wrote:
which formatting code should be used for a Py_ssize_t value in e.g. PyString_FromFormat?
%zd
'%zd' won't work since my value can be negative, and the 'z' modifier converts the argument to size_t.
That's a bug. It should print it signed. If unsigned printing of size_t is desired, %zu should be used. Regards, Martin