[issue19104] pprint produces invalid output for long strings

2014-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Antoine for your review. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue19104] pprint produces invalid output for long strings

2014-12-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 872f048f0403 by Serhiy Storchaka in branch '3.4': Issue #19104: pprint now produces evaluable output for wrapped strings. https://hg.python.org/cpython/rev/872f048f0403 New changeset 4d3066d4a5df by Serhiy Storchaka in branch 'default': Issue #19104

[issue19104] pprint produces invalid output for long strings

2014-12-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue19104] pprint produces invalid output for long strings

2014-12-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +needs review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue19104] pprint produces invalid output for long strings

2014-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What to do with this issue? -- versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list m

[issue19104] pprint produces invalid output for long strings

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue19104] pprint produces invalid output for long strings

2013-12-15 Thread Mark Lawrence
Mark Lawrence added the comment: Would it pay to have a meta issue for all the outstanding pprint issues, or possibly make issue 7434 the meta issue? -- nosy: +BreamoreBoy ___ Python tracker __

[issue19104] pprint produces invalid output for long strings

2013-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I doubt we are able to fix it in maintained releases. -- ___ Python tracker ___ ___ Python-bugs-li

[issue19104] pprint produces invalid output for long strings

2013-09-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The whole point of pprint() is formatted output of containers such as > list or dict. Well, the whole point of pprint is pretty-printing. Being restricted to containers is a bug, not a feature... -- ___ Python trac

[issue19104] pprint produces invalid output for long strings

2013-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The whole point of pprint() is formatted output of containers such as list or dict. Before 3.4 it does not wrap long strings at all. Of course I don't think this alternative is good. But at least it is better than producing illegal output. -- _

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Another possibility is not fixing this issue, and deciding it is > normal behaviour. It is trivial to add parentheses if you need them. > > It would be safer just do not wrap long line on first level. That would defeat the whole point of pprint().

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Both patches rely on implicit string literal concatenation. But with backslash it *looks* less implicit. > Another possibility is not fixing this issue, and deciding it is normal > behaviour. It is trivial to add parentheses if you need them. It would be

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > "implicit string literal concatenation considered harmful" Both patches rely on implicit string literal concatenation. Another possibility is not fixing this issue, and deciding it is normal behaviour. It is trivial to add parentheses if you need them.

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Second path uses parentheses. It is more complicated than first patch. I prefer first patch, because it is simple, because second variant wastes more width, because parentheses looks too similar to tuple, and because "implicit string literal concatenation co

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: According to PEP 8, parentheses should be used for multi-line expressions, not backslashes: """The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over multi

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you David. In any case this is worth a separate issue. Here is a patch. Personally I prefer to add continuation backslash even for inner wrapped lines, but I'm not sure that most core developers will agreed with it. -- keywords: +patch stage:

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread R. David Murray
R. David Murray added the comment: FYI this defect was mentioned (by Antoine) in Issue17530, though that issue is about bytes. -- nosy: +r.david.murray ___ Python tracker ___ __

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The documentation says: """The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter.""" But #since issue17150 long lines are splitted on shorter lines without continu