[issue20774] collections.deque should ship with a stdlib json serializer

Antoine Pitrou report at bugs.python.org
Wed Feb 26 16:34:43 CET 2014


Antoine Pitrou added the comment:

The problem is that it would be deserialized as a list; this breaks the general expectation that serialization formats should round-trip.

(yes, tuple already does this; but I think it is less of a problem for tuples, since the list API is a superset of the tuple API except for hashing)

So, perhaps we could ship an optional serializer (under which form?) accepting any sequence type (and perhaps any mapping type?), but it shouldn't be the default.

----------
nosy: +ezio.melotti, pitrou, rhettinger
type:  -> enhancement
versions: +Python 3.5 -Python 2.7, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20774>
_______________________________________


More information about the Python-bugs-list mailing list