[issue29663] Make collections.deque json serializable

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue20774. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> collections.deque should ship with a stdlib json serializer _

[issue29663] Make collections.deque json serializable

2017-02-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 This isn't really different that how we handle tuples and I can see that it would be useful to be able to dump a deque into JSON. I concur that it is reasonable to ignore maxlen because that is primarily a convenience feature (auto-popping on overflow)

[issue29663] Make collections.deque json serializable

2017-02-27 Thread Tarek Ziadé
New submission from Tarek Ziadé: collections.deque could be serialized in JSON as a simple array. The only thing we can lose in the process is the maxlen value, but I think it's a decent behaviour to ignore it when encoding and to set it to None when decoding. -- components: Library (