I’m reading code from GraphServer.
And there is this function that has weird indentation (5th line counting from the bottom and the 1st line counting from bottom):

That fifth to bottom line has a tab character and I have my vim set up to show an indentation of 4. The bottom yield line has a tab plus four spaces. All other lines are all headed by spaces.
I thought code like this would create inconsistency and would be a problem in Python. But the code seems to run fine (I don’t know if run correctly, it probably does.). Does python just say ok one tab equals 8 spaces and interpret it as so? I have Python 2.6 running.
Yes, Python considers a tab to be (up to) 8 spaces, i.e., that there’s a tab stop every 8 characters. So that oddly-indented
yieldline actually lines up with the other lines around it in Python-vision.Such are the perils of working with mixed tabs and spaces. Invoke Python with the
-ttcommand-line option to have it throw an error on these kinds of files.