Raymond Hettinger <raymond.hettin...@gmail.com> added the comment: Sorry Jonathan, this is the way the python containers work if they take an iterable input. In the case of a str, it is not possible for us to know whether you mean for deque('abc') to go it as three arguments or as one.
FWIW, if you don't what to put the single element in a list, the API provides the append() method for adding scalars and extend() method for adding iterables: d = deque() d.append('abc') d.extend('abc') Note that lists behave the same way. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32595> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com