New submission from Gabriel Genellina <gagsl-...@yahoo.com.ar>:

json compares arguments against True/False by identity, not by boolean 
value; by example:

    if (skipkeys is False and ensure_ascii is True and
        check_circular is True and allow_nan is True ...

Using `ensure_ascii=1` won't work as intended. I don't see the reason 
to check those values by identity - they *are* boolean flags, and 
should be checked by value, as the usual practice.

The attached patch fixes the code and documentation (and a bug encoding 
True/False as keys, including unit tests)

----------
components: Library (Lib)
messages: 79832
nosy: gagenellina
severity: normal
status: open
title: json checks True/False by identity, not boolean value
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4945>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to