https://typeguard.readthedocs.io/en/latest/#
# -*- coding: utf-8 -*- # @Time : 2021/3/31 15:06 # @Author : zhaozhuang from typeguard import typechecked # @typechecked def some_function(a: int, b: float, c: str, *args: str) -> bool: res = a - b return res print(some_function(1, 1.2, 'nihao'))
添加注解之后,直接报错