[Tutor] syntax error

Alan Gauld alan.gauld at freenet.co.uk
Tue Aug 1 00:43:11 CEST 2006


> My brain has gone squishy.  

:-)  I know the feeling...

> Here is the error message:
>>>> from linkedPriorityQueue import *
> Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "linkedPriorityQueue.py", line 27
>    else node.cargo <= self.head.cargo:
>            ^
> SyntaxError: invalid syntax

else:

or 

elif condition:

but not 

else condition:

HTH,

Alan G.



More information about the Tutor mailing list