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

SilentGhost report at bugs.python.org
Mon Jul 25 08:20:58 EDT 2016


SilentGhost added the comment:

The question is why are you defining __len__ if you don't know the size of your final object? Or at least, why are you starting with a potentially wrong initial value? This issue doesn't exist if you either don't define the method or return correct value.

----------

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


More information about the Python-bugs-list mailing list