Terry J. Reedy added the comment: The current behavior of IDLE's feature is standard, not a bug. The cpython respository does not currently accept .py, .c, or .rst files with any trailing whitespace. <pythondir>/tools/scripts/patchcheck.py strips trailing whitespace from all lines. Notepad++, a widely used multi-language Windows programmer's editor, does the same.
I am aware of the potential surprise. If one wants multiline strings with embedded trailing whitespace, one should avoid trailing whitespace strippers or use Python's string concatenation feature. >>> s = ('space \n' 'tab\t\n' 'line3\n') >>> s 'space \ntab\t\nline3\n' I am revising the doc to make the rstring behavior clearer. ---------- stage: -> patch review title: IDLE 'strip trailing whitespace' changes the value of multiline strings -> IDLE 'strip trailing whitespace' changes multiline strings versions: +Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31477> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com