Python相当于Matlab的set函数(Python equivalent to Matlab's set function)

编程入门 行业动态 更新时间:2024-10-26 14:36:36
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

更多推荐

本文发布于:2023-08-06 04:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1444841.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   Matlab   Python   set   function

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!