"Invalid literal for int() with base 10": is it really a literal?

Dieter Maurer dieter at handshake.de
Sat May 27 00:29:14 EDT 2023


Chris Angelico wrote at 2023-5-26 18:29 +1000:
> ...
>However, if you want to change the wording, I'd be more inclined to
>synchronize it with float():
>
>>>> float("a")
>Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>ValueError: could not convert string to float: 'a'

+1


More information about the Python-list mailing list