如何检查numpy dtype是否是完整的?我试过了:
issubclass(np.int64, numbers.Integral)
Run Code Online (Sandbox Code Playgroud)
但它给了False.
更新:它现在给出True.
def foo(
hello: str='world', bar: str=None,
another_string_or_None: str|????=None):
pass
Run Code Online (Sandbox Code Playgroud)
我试图在函数中设置Python中的类型提示,你可以添加多个类型提示something: str|bool='default value',但是,提示的类型是None什么?:/