Scoping Issues

Ethan Furman ethan at stoneleaf.us
Fri May 25 11:16:48 EDT 2012


Andrew Berg wrote:
> On 5/24/2012 8:59 PM, Dave Angel wrote:
>> so I fixed that, and got
>>      inconsistent use of tabs and spaces in indentation
>>
>> because you mistakenly used tabs for indentation.
> Not to start another tabs-vs.-spaces discussion, but tabs are perfectly
> legal indentation in Python. That exception is raised when the
> interpreter can't determine how much a line is indented because tabs and
> spaces are both used.

To be clear: each entire suite must be consistent with its use of either 
tabs /or/ spaces -- attempting to use both, even on seperate lines, 
raises `TabError: inconsistent use of tabs and spaces in indentation`. 
(Python 3, of course. ;)

~Ethan~



More information about the Python-list mailing list