Flattening a dictionary into a string
For python 3.0+ (as @Serdalis suggested)

', '.join("{!s}={!r}".format(key,val) for (key,val) in k.items())


Older versions:

', '.join("%s=%r" % (key,val) for (key,val) in k.iteritems())