MiPy, estrechamiento de tipo desde valores de retorno.
Estoy analizando el siguiente ejemplo de Python escrito: from future import annotations from typing import Optional class Thing: def does_intersect(self, other: Thing) -> bool: return True def intersect(self, other: Thing) -> Optional[Thing]: if self.does_intersect(other): return self else: return None def my_function() -> Thing: thing = Thing() other_thing = Thing() if . . . Read more