[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-06-21 Thread Adam Bartoš
Changes by Adam Bartoš : -- nosy: +Drekin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Well it seems a little odd to spend effort on a corner case of the C-level error messages if we can't even replicate it in pure Python. -- ___ Python tracker

[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think we can make this feature available with classic formatting '%.100r', but with new formatting '{0:.100!r}' (especially with f-strings) this can be not so easy. -- ___ Python tracker

[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Could we make this feature available at the Python level too? It sounds really useful. --Guido (mobile) On Jan 12, 2016 2:01 AM, "STINNER Victor" wrote: > > STINNER Victor added the comment: > > See my old issue #10833 which proposed to *remove* the arbitrar

[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-01-12 Thread STINNER Victor
STINNER Victor added the comment: See my old issue #10833 which proposed to *remove* the arbitrary limit on strings. It was rejected. -- ___ Python tracker ___ __

[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-01-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-01-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The C code often uses %. in PyUnicode_FromFormat(). %.200s protects from unlimited output when broken pointer points on random non-null-terminated data. %.200R is used to limit the size of human-readable messages. In all these case formatted string can lo