Ezra Berch <ezrabe...@mac.com> added the comment: I've created a patch using the conditional expression in msg151945. The one problem I found with it is that when the input string is terminated by a newline it removes that newline.
I've added an optional third argument: a function which determines which lines are indented. If omitted, the default behavior is to indent non-empty lines. ---------- keywords: +patch nosy: +ezberch Added file: http://bugs.python.org/file24374/indent.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13857> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com