[docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode

Марк Коренберг report at bugs.python.org
Wed Jan 11 17:41:19 CET 2012


New submission from Марк Коренберг <socketpair at gmail.com>:

$ ipython
In [1]: type(json.dumps({'a':'b'}, ensure_ascii=False))
Out[1]: <type 'str'>

In [2]: type(json.dumps({'a':u'b'}, ensure_ascii=False))
Out[2]: <type 'unicode'>
-----------------------
Documentation:
If ensure_ascii is False, then the return value will be a unicode instance.
--------------------------------

Not applicable to python3

----------
assignee: docs at python
components: Documentation, Library (Lib)
messages: 151066
nosy: docs at python, mmarkk
priority: normal
severity: normal
status: open
title: json.dump(ensure_ascii=False) return str instead of unicode
type: behavior
versions: Python 2.6, Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13769>
_______________________________________


More information about the docs mailing list