[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:05:22 EDT 2016


Grigory Statsenko added the comment:

I can't do that if I don't know how many entries there will be ahead of time. In my real-life situation I'm fetching the data from a database not knowing how many entries I'll get before I actually get them (in the iterator). In most cases there are huge amounts of entries that take up too much memory - that's why I need to stream it. But sometimes the result set is empty - and that's when everything fails.

----------

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


More information about the Python-bugs-list mailing list