You are viewing a single comment's thread. Return to all comments →
What is this syntax?
def gcd(a: int, b: int) -> int:
I have never seen that before in python3, couldyou ellaborate on what it is for?
At first i thought that gcd only accepted a and b to be an integer. But when I tried setting a to an float, no error accured.
Function annotations https://www.python.org/dev/peps/pep-3107/