New submission from Zack: We used to be able to override _iterencode prior to 2.7 to get our namedtuples to be encoded as dict using json.dump(s) but now we can not.
Namedtuples are automatically encoded as list but it would be more logical and convenient to have them encoded as dict ---------- messages: 236139 nosy: Zack--, ezio.melotti, pitrou, rhettinger priority: normal severity: normal status: open title: Allow namedtuple to be JSON encoded as dict type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23473> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com