博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
python getatrra()
阅读量:3921 次
发布时间:2019-05-23

本文共 427 字,大约阅读时间需要 1 分钟。

getattr(object, name[, default])

Return the value of the named attribute of object. name must be a string. If the string is the name of one of the object’s attributes, the result is the value of that attribute. For example, getattr(x, ‘foobar’) is equivalent to x.foobar. If the named attribute does not exist, default is returned if provided, otherwise AttributeError is raised.
返回对象的命名属性的值。名称必须是字符串。如果字符串是对象属性之一的名称,则结果是该属性的值。

转载地址:http://rlhrn.baihongyu.com/

你可能感兴趣的文章
centos系统安装tar/rpm文件
查看>>
/etc/sysconfig/network-scripts下文件
查看>>
centos7安装ansible遇到的问题
查看>>
centos安装ansible及其依赖包
查看>>
常用ansible命令
查看>>
paramiko
查看>>
dhcp简单配置
查看>>
dhcp安装出现的问题
查看>>
划分子网
查看>>
nmcli中的几种模式
查看>>
建立bond的几种参数
查看>>
查看建立的bond的状态
查看>>
多网口绑定配置文件 设置方法
查看>>
nmtui配置网络连接
查看>>
nmcli的设备和连接
查看>>
eth0未启动或找不到设备
查看>>
rmmod命令
查看>>
centos7安装PHP5.5
查看>>
cenos7排错之yum依赖错误处理:清理重复的rpm包
查看>>
php卸载
查看>>