Simon Willison’s Weblog

Subscribe

Tuesday, 7th January 2020

Better Python Object Serialization. TIL about functions.singledispatch, a decorator which makes it easy to create Python functions with implementations that vary based on the type of their arguments and which can have additional implementations registered after the fact—great for things like custom JSON serialization.

# 8:35 pm / functional-programming, json, python, serialization

2020 » January

MTWTFSS
  12345
6789101112
13141516171819
20212223242526
2728293031