Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it?
patrick vrijlandt
patrick.vrijlandt at gmail.com
Thu Sep 19 15:08:55 EDT 2013
John Gordon <gordon at panix.com> wrote:
> In <22b99b0a-598f-4500-9de9-5041c2ce2c8f at googlegroups.com> William Bryant
> <gogobebe2 at gmail.com> writes:
>
>> the word 'def' has squiggily lines but the program works fine. It says:
>> Syntax Error: expected an indented block. - why?
>
>> def restart():
>
> This may be caused by the code before 'def'. Post the whole program.
It may also have to do with having both tabs and spaces in one source file.
Python cannot recognise the indentation if you do that. Replace al tabs by
4 spaces.
--
patrick
More information about the Python-list
mailing list