Antoine Pitrou added the comment: I don't know about __index__, but there's the ages-old discussion of allowing some kind of __json__ hook on types. Of course, none of those solutions would allow round-tripping.
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24313> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com