Message258943
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. |
|
Date |
User |
Action |
Args |
2016-01-26 02:45:10 | rhettinger | set | recipients:
+ rhettinger, tim.peters, mark.dickinson, serhiy.storchaka |
2016-01-26 02:45:10 | rhettinger | set | messageid: <1453776310.29.0.893493832677.issue26194@psf.upfronthosting.co.za> |
2016-01-26 02:45:10 | rhettinger | link | issue26194 messages |
2016-01-26 02:45:09 | rhettinger | create | |
|