2020
11-06
11-06
python基于exchange函数发送邮件过程详解
1.Pythonhasattr()函数描述hasattr()函数用于判断对象是否包含对应的属性。语法hasattr语法:hasattr(object,name)参数object--对象。name--字符串,属性名。返回值如果对象有该属性返回True,否则返回False。实例以下实例展示了hasattr的使用方法:#!/usr/bin/python#-*-coding:UTF-8-*-classCoordinate:x=10y=-5z=0point1=Coordinate()print(hasattr(point1,'x'))print(hasattr(poin...
继续阅读 >