I was looking over some code for an open source project and I saw some strange whitespace stuff that I didn't even think would run. The thing is, it runs just fine. I was wondering if someone could explain what I'm missing.
I don't want to copy the exact code, so I'll simplify...
It starts with a class definition, easy enough
the next line is indented four space...
The next line is indented eight spaces....
self.name = name
the next line is indented with one tab
<tab>self.othername = name
I would think that python would bark about the whitespace not being correct. I thought that if you start a block of code, like a class, then every line of that class has to be indented the same way as the first line. So if I indented four spaces, I thought that everything else in the class needed to be indented four spaces.
What am I missing?