[Python-checkins] r74865 - python/trunk/Tools/scripts/pindent.py

georg.brandl python-checkins at python.org
Thu Sep 17 09:49:38 CEST 2009


Author: georg.brandl
Date: Thu Sep 17 09:49:37 2009
New Revision: 74865

Log:
#6912: add "with" block support to pindent.

Modified:
   python/trunk/Tools/scripts/pindent.py

Modified: python/trunk/Tools/scripts/pindent.py
==============================================================================
--- python/trunk/Tools/scripts/pindent.py	(original)
+++ python/trunk/Tools/scripts/pindent.py	Thu Sep 17 09:49:37 2009
@@ -88,10 +88,10 @@
 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:
 


More information about the Python-checkins mailing list