Created
April 5, 2013 20:02
-
-
Save davidbirdsong/5322179 to your computer and use it in GitHub Desktop.
test unicode kwargs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pprint | |
v_attrs = {u'change_user': u'david', | |
u'path': u'/gfs/v1/cans/loko.example.13510.26654.7305-pkg1/04/046ec7dc3e', | |
u'publish_date': u'2013-04-05 19:44:54', | |
u'release_date': u'2013-04-05 19:54:28', | |
u'release_user': u'david', | |
u'sha': u'046ec7dc3e', | |
u'user': u'david'} | |
def foo(**kwargs): | |
pprint.pprint(kwargs) | |
def scrub(d): | |
return dict((k.encode(), d[k]) for k in d) | |
# v_attrs = scrub(v_attrs) | |
foo(**v_attrs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment