Justin Lebar added the comment: Ah, I see. The examples do what you think they should do, but not for the reason you think they should do it -- the JSON encoding logic calls the encoder's encode() method before calling its default() method.
I still think the examples could be improved, perhaps by adding a comment to the effect of # Raises a TypeError. before the call to JSONEncoder.default(). Explicit is better than implicit, after all. :) Thanks for looking at this. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16057> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com