Serhiy Storchaka added the comment:

> We don't want to create more obstacles to upgrading or converting from Python 
> 2.

But these obstacles already exists.

The 10th parameter of dump() is "encoding" in Python 2 and simplejson, and 
"default" in Python 3.

The 12th parameter of dump() is "use_decimal" simplejson, and "sort_keys" in 
Python 2.

The 2nd parameter of load() is "encoding" in Python 2 and simplejson, and "cls" 
in Python 3.

Due to the fact that most arguments are boolean or accepts None some shifting 
of positional arguments can left unnoticed long time and causes subtle bugs 
when upgrading from Python 2 to Python 3 or switching between stdlib json 
module and simplejson.

Proposed change doesn't break any code at first stage, it just adds deprecation 
warning about using dangerous non-portable feature. We can defer forbidding 
positional parameters until Python 2 will gone and simplejson will be changed 
to keyword-only parameters too.

----------

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

Reply via email to