Relative Content

Tag Archive for pythonpython-typingtypechecking

typing for object that isn’t an instance of a class

So I’ve come upon an interesting Python typing problem. I have a function that can take parameters of any type, and if they are an instance of a class, it interprets them one way, and if they are not instances of that class, it interprets them another way.