I stumbled over the following code:
x: int = 1.0
and I wonder: what does it do (and why does it work at all - I expect this to be a SyntaxError)?
The only thing I found out is that the tpye of x
is still float
, so it is not equivalent to x = int(1.0)
.