This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author j5
Recipients j5
Date 2008-04-16.21:40:02
SpamBayes Score 0.095388465
Marked as misclassified No
Message-id <1208382006.33.0.385183415053.issue2646@psf.upfronthosting.co.za>
In-reply-to
Content
# given this function

def a(**kwargs):
    pass

# this works
a(**{'b':'c'})

# this throws a format error
a(**{u'b':'c'})

I am using a web framework (TurboGears w/ genshi templating) which often
pass around dictionaries as keyword arguments in order to have 1 to 1
representation of json data and URL parameters.  This is usually fine
except when using libraries such as simplejson which encodes all of the
keywords as unicode.

Attached is a patch which is most likely just the tip of the iceberg but
hopefully it turns out to be this easy.
History
Date User Action Args
2008-04-16 21:40:07j5setspambayes_score: 0.0953885 -> 0.095388465
recipients: + j5
2008-04-16 21:40:06j5setspambayes_score: 0.0953885 -> 0.0953885
messageid: <1208382006.33.0.385183415053.issue2646@psf.upfronthosting.co.za>
2008-04-16 21:40:05j5linkissue2646 messages
2008-04-16 21:40:04j5create