This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients Tom.Brown, amirouche, barry, daniel.urban, eric.araujo, ezio.melotti, nikow, rhettinger, wiz21
Date 2018-11-15.18:24:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542306269.01.0.788709270274.issue12657@psf.upfronthosting.co.za>
In-reply-to
Content
A modern solution for this is to define a singledispatch function (with implementations for your custom types) and pass it as the `default` parameter to the dump functions.

(That won’t avoid the custom → dict copy, but that’s how the module works)
History
Date User Action Args
2018-11-15 18:24:29eric.araujosetrecipients: + eric.araujo, barry, rhettinger, ezio.melotti, daniel.urban, Tom.Brown, nikow, amirouche, wiz21
2018-11-15 18:24:29eric.araujosetmessageid: <1542306269.01.0.788709270274.issue12657@psf.upfronthosting.co.za>
2018-11-15 18:24:28eric.araujolinkissue12657 messages
2018-11-15 18:24:28eric.araujocreate