On 5/13/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > '%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.
Looking in stringobject.c, I don't see how %zu (or %lu) can be used with String_FromFormatV. Here's the code around line 260 (note ssize_t in the comment really means Py_ssize_t): /* handle the long flag, but only for %ld. others can be added when necessary. */ if (*f == 'l' && *(f+1) == 'd') { longflag = 1; ++f; } /* handle the ssize_t flag. */ if (*f == 'z' && *(f+1) == 'd') { size_tflag = 1; ++f; } n _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com