Python相当于Matlab的set函数(Python equivalent to Matlab's set function)
Python中是否有与Matlab函数set相同的表达式? 这是链接: http : //www.mathworks.com.au/help/matlab/ref/set.html
Is there an equivalent expression in Python for the Matlab function set? Here's the link: http://www.mathworks.com.au/help/matlab/ref/set.html
最满意答案
看起来非常类似于内置的setattr 。
使用基本上是:
setattr(myObject, "key", "value")或者在python docs http://docs.python.org/2/library/functions.html#setattr中
Looks very similar to the builtin setattr.
Use is basically:
setattr(myObject, "key", "value")Or in the python docs http://docs.python.org/2/library/functions.html#setattr
更多推荐
发布评论