Lukas Lueg added the comment:

It's perfectly fine for the function to return an object that can't be put 
directly into a json string. The function may not convert the object directly 
but in multiple steps; the encoder will call the function again with the new 
object until everything boils down to a str, an integer etc.. If one keeps 
returning objects that never converge to one of those basic types, the 
interpreter faces death by infinite recursion. The situation described here 
adds the oom condition caused by repr() blowing up.

----------

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

Reply via email to