[Python-ideas] Json object-level serializer
solipsis at pitrou.net
Thu Jul 29 16:22:13 CEST 2010
> > Besides, defining an ABC for a single, module-specific method sounds
> > rather overkill. This reminds of me of projects plagued by an overuse of
> > interfaces for every possible concept.
> Thats what Iterator did in ABC though.
Well, it could be argued that testing for an Iterator is useful for a
significant variety of code, while testing for a JSONSerialiazable
doesn't have an use case outside of the json module itself.
Besides, it remains to be seen if anyone will use the Iterator ABC
instead of directly looking up the __next__ method. I'm not convinced
that all of the ABCs bundled with the stdlib are really useful, apart
from showcasing the potentialities of ABCs.
More information about the Python-ideas