Raymond Hettinger added the comment:

Mark, Serhiy and Timmy, do you have any thoughts on what is the right behavior?

One option is to always pop the rightmost element to make room, but that 
results in a weird asymmetry between d.insert(len(d), item) and what 
d.append(item) would do.  I can't seem to come with a coherent set of 
invariants that doesn't have a surprising discontinuity.

Another option is to "refuse the temptation to guess" at what the user intends 
for the popped-off element to be and to raise an exception.  But that isn't 
very user friendly either.

----------
nosy: +mark.dickinson, serhiy.storchaka, tim.peters

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26194>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to