Indentation problems

Tim Chase python.list at
Sun Nov 8 20:48:06 CET 2009

> I am having problems with indentation some times. When I hit the enter key
> after if statements or while statemt there are times when the indentation is
> too much and other times too little.

Which editor are you using?  On which operating system?  Check 
for settings regarding spaces-per-tab, whether the editor expands 
tabs to spaces, and where your tab-stops are.  If you were using 
Vim, I'd tell you to look at your settings for

   :set ai? ts? sts? sw? et? cpo? si? cin? inde?

any of which can be tweaked to adjust the behavior of automatic 
indenting.  Your unnamed editor may have some similar options you 
can control.


More information about the Python-list mailing list