This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add 'with' block support to Tools/Scripts/pindent.py
Type: behavior Stage:
Components: Demos and Tools Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2009-09-14 17:57 by terry.reedy, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg92622 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2009-09-14 17:57
As reported by Miles Kaufmann on python-list, 
Tools/Scripts/pindent.py
has not been updated to support 'with' blocks.

I suspect that it would be sufficient to add ",'with'" to
start = 'if', 'while', 'for', 'try', 'def', 'class'

Since there are no "next['def'/'class']" lines, I suspect none is needed
for 'with' either.
msg92742 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-09-17 07:49
Added in r74865.
msg177056 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-12-06 20:19
Actually without "next['with'] = 'end'" "with" support is broken. See issue15539.
History
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51161
2012-12-06 20:19:16serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg177056
2009-09-17 07:49:43georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg92742

resolution: fixed
2009-09-14 17:57:26terry.reedycreate