What is the correct syntax for a Python function/method argument when it has more than one possible type hints?
What is the correct syntax for a Python function/method argument when it has more than one possible type hints? Question: import os def scan(path) -> os.DirEntry : return os.scandir(path) What is the correct type hint for the path argument of this function? According to documentation: path may be a path-like object. If path is of …