I don't understand what the arg: str
means
def hello(arg: str):
print(type(arg))
print('do stuff!', arg)
hello('something')
I thought it was specifing a type, but I tried to call hello, and I haven't got any exception. I've tried to call hello
with an int
, no error.
I've done a few test, but I haven't come up with anything...
Any idea about what this is doing?
Matt