you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 4 hours ago*

If you don't care you can pass in default=str (I think) but if you do care you can define a function for what the string representation should look like and pass that in, but that's a happy path case to be honest. I usually only run into this problem when something is logging unknown data (otherwise I prefer to model data like this so the IDE is happy) so I pass in the default=str just to get it functional.

Duck typing usually works but, datetime man, datetime is the warp from Warhammer 40K, it will drive you mad.

  • source
  • parent