[issue30248] Using boolean arguments in the _json module

Josh Rosenberg report at bugs.python.org
Wed May 3 14:48:40 EDT 2017


Josh Rosenberg added the comment:

So, incredibly minor note:

This will prevent a ridiculous use case of passing in a mutable object as the argument (say, a list), and mutating it between truthy and falsy values (appending or clearing) to toggle behaviors in an existing Encoder.

Note: As stated, this is a ridiculous use case, and I don't think we should be handcuffed by compatibility with an insane behavior that no one has likely ever used. The docs never guarantee that those values are examined live, so it's an implementation detail, and not a useful one at that. I just want to mention it so there is a small note in MISC/News or the like to document that slight tweak in observed behavior.

Otherwise, change looks good to me.

----------
nosy: +josh.r

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


More information about the Python-bugs-list mailing list