如果您查看以下 python 代码行:
bpy.ops.object.particle_system_add({"object":bpy.data.objects[2]})
你看到在参数中有一些东西用大括号括起来了。谁能告诉我牙套的用途(总的来说)?我还没有真正在 Python 中看到过这种类型的语法,也找不到任何相关文档。
非常感谢任何帮助。谢谢。
最佳答案
Dictionaries can be created by placing a comma-separated list of key: value pairs within braces, for example:
{'jack': 4098, 'sjoerd': 4127}
or{4098: 'jack', 4127: 'sjoerd'}
, or by thedict
constructor.
关于python - python中带大括号的参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3010225/