[Python-ideas] Json object-level serializer

Antoine Pitrou solipsis at pitrou.net
Thu Jul 29 15:11:16 CEST 2010


On Thu, 29 Jul 2010 22:51:11 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> 
> Each individual time this question comes up people tend to react with
> "oh, that's too complicated and overkill, but magic methods are
> simple, so let's just define another magic method". The sum total of
> all those magic methods starts to accumulate into a lot of complexity
> of its own though :P

I don't agree. __json__ only matters to people who do JSON
encoding/decoding. Other people can safely ignore it.

And I don't see how generic functions bring less cognitive overhead.
(they actually bring more of it, since most implementations are more
complicated to begin with)






More information about the Python-ideas mailing list