Python文档说浮点计算失败时会引发FloatingPointError.但这里的"浮动计算"究竟是什么意思呢?我尝试使用浮点数进行添加,乘法和除法,但从未设法提出此特定错误.相反,我有一个TypeError:
10/'a'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'int' and 'str'
Run Code Online (Sandbox Code Playgroud)
有人可以帮我理解什么时候FloatingPointError在python中引发?
python ×1