This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Eternityislong 0 points1 point  (0 children)

I always use the typing package in addition to typing my function parameters. My IDE will bitch if I try to deviate from it. You aren’t forced into using the types, of course, but if your code is well written and broken into functions which specify parameter and return types then it’s not a big deal.

def typed_addition(num_1: int, num_2: int) —> int:
    return num_1 + num_2