learning python ...
Grant Edwards
grant.b.edwards at gmail.com
Mon May 24 14:48:58 EDT 2021
On 2021-05-24, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
> Attempting to rebind a keyword in Python will produce an error...
>
>>>> if = 1.234
> Traceback ( File "<interactive input>", line 1
> if = 1.234
> ^
> SyntaxError: invalid syntax
I must admit it might be nice if the compiler told you _why_ the
syntax is invalid (e.g. "expected conditional expression while parsing
'if' statement").
It's usually fairly obvious, but...
--
Grant
More information about the Python-list
mailing list