Nick Coghlan added the comment:

The two "isinstance" checks that bother me are the ones for int and float. 
However, given that the JSON serialiser *already* includes those explicit 
checks, I now think it makes sense to just do the minimal fix of coercing 
subclasses to the base type for both of those cases, especially since such a 
change should be able to be ported to simplejson as well.

Anything more elaborate (including making JSON explicitly enum aware, or else 
offering a new encoder that supports singledispatch) should be handled in a 
separate issue.

----------

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

Reply via email to