How do I add default parameters to functions when using type hinting?
If I have a function like this: def foo(name, opts={}): pass And I want to add type hints to the parameters, how do I do it? The way I assumed gives me a syntax error: def foo(name: str, opts={}: dict) -> str: pass The following doesn’t throw a syntax error but it doesn’t seem like … Read more