Feb-16-2018, 10:39 PM
In some code I've seen stuff like this:
def some_function(a -> int):
#do somethingI thought a -> int was called a decorator, but a decorator seems to be this:def some_function(func):
def some_func(*args):
#do something to func
return func(*args)
return some_func
@some_function
def some_other_function(params):
#do somethingSo if a -> int is not a decorator, what's it called and what does it do?
