我正在抓住以下代码中的内容.
class foo(object):
def __init__(self,*args):
print type(args)
print args
j_dict = {'rmaNumber':1111, 'caseNo':2222}
print type(j_dict)
p = foo(j_dict)
Run Code Online (Sandbox Code Playgroud)
它产生:
<type 'dict'>
<type 'tuple'>
({'rmaNumber': 1111, 'caseNo': 2222},)
Run Code Online (Sandbox Code Playgroud)
在我看来,这个代码将字典转换为元组!谁能解释一下呢
| 归档时间: |
|
| 查看次数: |
128 次 |
| 最近记录: |