From: keith papa <keith...@live.com>
>To: Alan Gauld <alan.ga...@btinternet.com> 
>Sent: Monday, 14 April 2014, 18:19
>Subject: RE: [Tutor] python errors
> 
>
>
> 
>>>> x = "foo" - 4
>
>
>Traceback (most recent call last):
>  File "<pyshell#0>", line 1, in <module>
>    x = "foo" - 4
>TypeError: unsupported operand type(s) for -: 'str' and 'int'
>>>> 
>
>That's right, its a semantic error. You  shouldn't be trying to subtract a 
>number 
from a string. It's not a meaningful thing to do,

The Python errors are not categorised into syntactic, semantic and runtime
error types, (although there is a syntax error exception). Those are computer 
science concepts not explicitly exposed by Python. Python just reports an 
error as above.

Alan g.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to