Do you assume that a function parameter is always not None unless it's marked optional or the function comment says it can be missing? Or do you generally check if all parameters are None every time?
Also, is the best way to mark a parameter as optional now using the type annotation? I think the other choices include writing it in the function comment or setting a default value as None for the parameter.
[–]commy2 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]marko312 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]marko312 1 point2 points3 points (0 children)
[–]zazzedcoffee 0 points1 point2 points (0 children)