[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: For int, the spec is: [[fill]align][sign][#][0][width][,][.precision][type] So, for "06d", "0" is matched as the literal 0, "6" is matched as width, and "d" is matched as type. For "\x00<6d", "\x00" is matched as fill, "<" as align, "6" as width, and "d" as ty

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-05-19 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-05-19 Thread STINNER Victor
STINNER Victor added the comment: I don't understand why it works with "<", "=" or ">": >>> "{0:\x00<6d}".format(123) '123\x00\x00\x00' But not without: >>> "{0:\x006d}".format(123) Traceback (most recent call last): File "", line 1, in ValueError: Invalid format specifier Compare it to:

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Eric V. Smith
Eric V. Smith added the comment: Fixed in 2.7, 3.4, 3.5. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c484551bce1 by Eric V. Smith in branch '3.4': Issue #12546: Allow \x00 as a fill character for builtin type __format__ methods. http://hg.python.org/cpython/rev/7c484551bce1 New changeset bd90e68dc81f by Eric V. Smith in branch 'default': Closes i

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 520ce42ba2b8 by Eric V. Smith in branch '2.7': Issue #12546: Allow \x00 as a fill character for builtin type __format__ methods. http://hg.python.org/cpython/rev/520ce42ba2b8 -- nosy: +python-dev ___ Pyt

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Eric V. Smith
Changes by Eric V. Smith : -- type: enhancement -> behavior versions: +Python 2.7, Python 3.4 ___ Python tracker ___ ___ Python-bugs-l

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-08 Thread STINNER Victor
STINNER Victor added the comment: The patch looks good to me. -- type: behavior -> enhancement versions: -Python 2.7, Python 3.4 ___ Python tracker ___ _

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-03 Thread Eric V. Smith
Changes by Eric V. Smith : -- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list ma

[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-03 Thread STINNER Victor
STINNER Victor added the comment: #17705 has been closed as a duplicate of this issue. -- ___ Python tracker ___ ___ Python-bugs-list

[issue12546] builtin __format__ methods cannot fill with \x00 char

2011-07-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12546] builtin __format__ methods cannot fill with \x00 char

2011-07-19 Thread Eric V. Smith
Eric V. Smith added the comment: I finally got around to reviewing the patch. A couple of comments: 1. There should be some tests for str.__format__, not just str.format. This is really a bug with str.__format__, after all. I can add those. 2. The bigger issue is that the other built in forma