Python, unsupported operand type(s) for *: ‘int‘ and ‘NoneType‘

阅读 196

2022-02-16

File "<__array_function__ internals>", line 6, in dot
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

使用dot时,左右两边类型不同,函数没有返回值,默认返回None

一般出现:TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'。都是返回值为 None 了

相关推荐

精彩评论(0)

0 0 举报