【发布时间】:2010-12-31 17:44:58
【问题描述】:
class a(object):
data={'a':'aaa','b':'bbb','c':'ccc'}
def pop(self, key, *args):
return self.data.pop(key, *args)#what is this mean.
b=a()
print b.pop('a',{'b':'bbb'})
print b.data
self.data.pop(key, *args)←------为什么还有第二个参数?
【问题讨论】:
-
或者如果你真的很懒
help(b.data.pop)REPL。
标签: python dictionary