[issue27613] Empty iterator is rendered as a single bracket ] when using json's iterencode

Grigory Statsenko report at bugs.python.org
Mon Jul 25 08:44:56 EDT 2016


Grigory Statsenko added the comment:

With streaming you never know the real length before you're done iterating.

Anyway, the fix really shouldn't be that complicated:
In _iterencode_list just yield  the '[' instead of saving it to buf

----------

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


More information about the Python-bugs-list mailing list