IndentationError: expected an indented block but it's there

Chris Angelico rosuav at gmail.com
Wed May 29 03:59:30 EDT 2013


On Wed, May 29, 2013 at 2:53 AM, Peter Otten <__peter__ at web.de> wrote:
> Chris Angelico wrote:
>
>> On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__peter__ at web.de> wrote:
>>> Solution: configure your editor to use four spaces for indentation.
>>
>> ITYM eight spaces.
>
> I meant: one hit of the Tab key should add spaces up to the next multiple of
> four. Which implies
>
>> But the real solution is to not mix tabs and
>> spaces. Stick to one or the other and you're safe.

Sure. If you configure your tab *key* to not insert a tab *character*,
then you're fine. Or alternatively, if you always use \t for
indentation, you can tweak the displayed width of it. (Or, as I do,
just let it be eight wide. On today's screens that's not much of a
problem.)

ChrisA



More information about the Python-list mailing list