]> granicus.if.org Git - python/commitdiff
#6912: add "with" block support to pindent.
authorGeorg Brandl <georg@python.org>
Thu, 17 Sep 2009 07:49:37 +0000 (07:49 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 17 Sep 2009 07:49:37 +0000 (07:49 +0000)
Tools/scripts/pindent.py

index ec440d14fb346afc7569daee0e5998ab8be06369..7bfc4153d2eaa17472c57c74dbc310c07e2fe529 100755 (executable)
@@ -88,10 +88,10 @@ next = {}
 next['if'] = next['elif'] = 'elif', 'else', 'end'
 next['while'] = next['for'] = 'else', 'end'
 next['try'] = 'except', 'finally'
-next['except'] = 'except', 'else', 'end'
+next['except'] = 'except', 'else', 'finally', 'end'
 next['else'] = next['finally'] = next['def'] = next['class'] = 'end'
 next['end'] = ()
-start = 'if', 'while', 'for', 'try', 'def', 'class'
+start = 'if', 'while', 'for', 'try', 'with', 'def', 'class'
 
 class PythonIndenter: