I've just come across a strange behaviour with Python's type hinting.
>>> def x(y: int):
return y
>>> d=x('1')
>>> print(type(d))
<class 'str'>
>>> d
'1'
When I pass a number as string into the function where the argument is cast as int, it still produces string. I think a key to this unexpected behaviour is that it is not casting, but hinting. But why does it behave like this? If I pass 'one' as an argument it gives me a NameError.