Author serhiy.storchaka
Recipients Julian, emilyemorehouse, georg.brandl, martin.panter, ncoghlan, pitrou, serhiy.storchaka, terry.reedy
Date 2017-06-27.05:13:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think the current behavior is useful, but undocumented. Otherwise a blank line starting with unmatched whitespaces (e.g. "  foo\n\t\n  bar") would block deindenting.

This also matches the behavior of Python parser which ignores all whitespaces in blank lines.

>>> exec('if 1:\n\tpass\n  pass\n')                                                                                                                                                         
Traceback (most recent call last):                                                                                                                                                              
  File "<stdin>", line 1, in <module>                                                                                                                                                           
  File "<string>", line 3                                                                                                                                                                       
IndentationError: unindent does not match any outer indentation level                                                                                                                           
>>> exec('if 1:\n\t\n  pass\n')                                                                                                                                                             

Added Antoine and Nick as yet two experts of the textwrap module.
Date User Action Args
2017-06-27 05:13:45serhiy.storchakasetrecipients: + serhiy.storchaka, georg.brandl, terry.reedy, ncoghlan, pitrou, Julian, martin.panter, emilyemorehouse
2017-06-27 05:13:45serhiy.storchakasetmessageid: <>
2017-06-27 05:13:45serhiy.storchakalinkissue30754 messages
2017-06-27 05:13:45serhiy.storchakacreate