[issue17705] Fill Character cannot be \0

2014-04-03 Thread Stefan Krah
Changes by Stefan Krah : -- superseder: -> builtin __format__ methods cannot fill with \x00 char ___ Python tracker ___ ___ Python-bu

[issue17705] Fill Character cannot be \0

2014-04-03 Thread Stefan Krah
Stefan Krah added the comment: This looks like a duplicate of #12546. -- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.5 -Python 2.7, Python 3.3 ___ Python tracker

[issue17705] Fill Character cannot be \0

2013-05-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue17705] Fill Character cannot be \0

2013-04-19 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue17705] Fill Character cannot be \0

2013-04-13 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue17705] Fill Character cannot be \0

2013-04-13 Thread Jason Michalski
Jason Michalski added the comment: I worked on a patch that allows NUL padding for longs, floats and complex numbers. It seems NUL was being used as a sentinel in the format string parsing when no padding character is given. It was then replaced with a space in each call to fill_padding if it

[issue17705] Fill Character cannot be \0

2013-04-13 Thread Stefan Krah
Stefan Krah added the comment: Mark Dickinson wrote: > Numpy, for example, pads strings will NUL bytes when placing a short > string in long fixed-width field. I was hoping to escape the work, but that's quite convincing. ;) Changing libmpdec doesn't look very appealing, so probably I'll use "

[issue17705] Fill Character cannot be \0

2013-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: > Is padding with NUL a legitimate use case? I don't see a good reason to disallow it, and it seems like a fairly plausible need. Numpy, for example, pads strings will NUL bytes when placing a short string in long fixed-width field. -- nosy: +mark.di

[issue17705] Fill Character cannot be \0

2013-04-13 Thread Stefan Krah
Stefan Krah added the comment: Unsurprisingly (libmpdec is a C library) this also does not work in _decimal. I could add a special case in _decimal.c at the cost of two additional if statements for all regular use cases. Is padding with NUL a legitimate use case? IOW, is the slowdown justified

[issue17705] Fill Character cannot be \0

2013-04-12 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue17705] Fill Character cannot be \0

2013-04-12 Thread Julian Berman
New submission from Julian Berman: The docs say: "The fill character can be any character other than ‘{‘ or ‘}’." http://docs.python.org/dev/library/string.html#format-specification-mini-language But: >>> "{0:\x01>8.2f}".format(12) '\x01\x01\x0112.00' whereas: >>> "{0:\x00>8.2f}".format(12)