params server mpilgrim database master uid sa pwd secret join for in p

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
>>> params = {"server":"mpilgrim", "database":"master", "uid":"sa", "pwd":"secret"}
>>> ";".join(["%s=%s" % (k, v) for k, v in params.items()], DWIM=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: join() takes no keyword arguments
>>> ["%s=%s" % (k, v) for k, v in params.items()]
['pwd=secret', 'database=master', 'uid=sa', 'server=mpilgrim']
>>> ";".join(["%s=%s" % (k, v) for k, v in params.items()])
'pwd=secret;database=master;uid=sa;server=mpilgrim'
>>> ";".join(["%s=%s" % (k, v) for k, v in params.items()],DWIM=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: join() takes no keyword arguments