码迷,mamicode.com
首页 > 其他好文 > 详细

'dict' object has no attribute 'a'

时间:2016-10-19 09:33:47      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

a = {}
#a.a = ‘a‘ #AttributeError: ‘dict‘ object has no attribute ‘a‘
#a[‘a‘] #KeyError: ‘a‘
a[a] = a
a #{‘a‘: ‘a‘}

 

'dict' object has no attribute 'a'

标签:

原文地址:http://www.cnblogs.com/jzm17173/p/5975901.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!