how can I convert a dictionary to a string of keyword arguments?
Posted
by shahjapan
on Stack Overflow
See other posts from Stack Overflow
or by shahjapan
Published on 2010-05-10T12:04:35Z
Indexed on
2010/05/10
12:14 UTC
Read the original article
Hit count: 395
we can convert the dictionary to kw using **kw but if I want kw as str(kw) not str(dict),
as I want a string with keyword arguments for code_generator,
if I pass
obj.method(name='name', test='test', relation = [('id','=',1)])
I want a function to return the string like
"name='name', test='test', relation = [('id','=',1)]"
© Stack Overflow or respective owner