John Leitch added the comment: I plucked the error message from the % operator:
>>> '%' % 'foo' Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: incomplete format >>> '%z' % 'foo' Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: unsupported format character 'z' (0x7a) at index 1 That said, it should be more consistent. I went with the latter suggestion since it's more informative. An updated patch is attached. As for platform compatibility, I'd certainly feel better if someone could test the Sun/AIX changes. Unfortunately, I'm unable to do so. It's interesting that OSX accepts "%". As per the spec, "%%" is a "%" literal, and the behavior of invalid tokens such as "%" is undefined. ---------- Added file: http://bugs.python.org/file40368/time_strftime_Buffer_Over-read_v3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24917> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com