ãã«ããã¤ãæåãå«ã¾ãªãUnicodeæååãdumpããã¨ããPyYAMLã¯!!python/unicodeã¿ã°ãä»å ããã import yaml d = {u'ãã«ãã¼ã©': u'Unicode'} print yaml.dump(d, encoding='utf-8', allow_unicode=True) # => {ãã«ãã¼ã©: !!python/unicode 'Unicode'} ããããããç®éããªã®ã§æ¶ããããæ¶ãã¦ã¿ãã import yaml d = {u'ãã«ãã¼ã©': u'Unicode'} def unicode_representer(dumper, data): return dumper.represent_scalar(u'!unicode', u'%s' % data) yaml.add_representer(unicode, unicode_
{{#tags}}- {{label}}
{{/tags}}