一个关于MIME的问题
msg = MIMEText(fp.read())
msg['Subject'] = 'The contents of %s' % textfile
msg['From'] = me
msg['To'] = you
msg的类型是instance
请问下为啥可以这样写 msg['subject'] msg难道是列表?
[解决办法]
看看手册The Python Language Reference 3.4节,了解一下类的一些特性...
[解决办法]
字典也可以的
发布时间: 2012-04-27 11:57:44 作者: rapoo
一个关于MIME的问题
msg = MIMEText(fp.read())
msg['Subject'] = 'The contents of %s' % textfile
msg['From'] = me
msg['To'] = you
msg的类型是instance
请问下为啥可以这样写 msg['subject'] msg难道是列表?
[解决办法]
看看手册The Python Language Reference 3.4节,了解一下类的一些特性...
[解决办法]
字典也可以的