|
|
|
|
|
by JimDabell
2667 days ago
|
|
"Indentation error" screams "fix the indentation", and code is indented with whitespace, so yeah. When something tells you "indentation error", where's the first place you would look, if not the indentation? When you know you have a problem with the indentation, what do you think you have to change, if not the whitespace? There isn't a lot of opportunity to go in the wrong direction here. Don't get me wrong, Python definitely has unexpected, difficult to debug behaviour for newbies (e.g. mutable default arguments). But this in particular isn't one of them. This is 2+2=4 level stuff. |
|
>what do you think you have to change, if not the whitespace?
Note that the same error shows up when you have an inconsistent number of spaces to indent a block.