在 blender3.1
的更新日志关于 Python api
的部分看到了下面的内容:
Python 3.10
Python has been upgraded from version 3.9 to 3.10, there are some changes that may impact script authors.
- Python 3.10 no longer implicitly converts floats to int's (issue linked). This means functions that previously accepted float typed values will raise a type error.
Floating point arguments must now be explicitly converted to integers (see example commits (rBAbb62f10, rBA7476c1a).
翻译一下就是:
Python 3.10
Python已经从3.9版本升级到3.10,有一些变化可能会影响到脚本作者。
Python 3.10 不再隐含地将浮点数转换为整数(问题链接)。这意味着以前接受浮点类型值的函数将引发一个类型错误。
浮点参数现在必须明确地转换为整数 (参见示例提交 (rBAbb62f10, rBA7476c1a)。
啥意思?是改了 feature
还是 修了 bug
?
bpo-37999: No longer use int in implicit integer conversions.