[issue32595] Deque with iterable object as one object

2018-01-19 Thread Jonathan
Jonathan added the comment: Hello, I dont know why but yesterday when i appended it behaved like extend. I should sleep more. 2018-01-18 20:27 GMT+00:00 Raymond Hettinger : > > Raymond Hettinger added the comment: > > Sorry Jonathan, this is the way the python containers work if they take an

[issue32595] Deque with iterable object as one object

2018-01-18 Thread Raymond Hettinger
Raymond Hettinger 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

[issue32595] Deque with iterable object as one object

2018-01-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32595] Deque with iterable object as one object

2018-01-18 Thread Jonathan
New submission from Jonathan : Creating a deque with an iterable object creates extra overhead if you want to insert it as one element. e.g: import timeit test1 = ''' str = "x" * 10 lst = [str] ''' test2 = ''' str = "x" * 10 ''' print(timeit.timeit(test1, number=10)) print(timeit