Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52229
| References | (1 earlier) <mailman.345.1375956533.1251.python-list@python.org> <531d89a8-61e1-4117-b4cc-f02b3be30bb9@googlegroups.com> <mailman.347.1375960376.1251.python-list@python.org> <9bd6192b-2c71-4662-808a-fd7e74dedeb8@googlegroups.com> <ku0tia$nkk$1@ger.gmane.org> |
|---|---|
| From | Joshua Landau <joshua@landau.ws> |
| Date | 2013-08-08 22:32 +0100 |
| Subject | Re: Suggestion: PEP for popping slices from lists |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.374.1375997589.1251.python-list@python.org> (permalink) |
On 8 August 2013 21:03, Terry Reedy <tjreedy@udel.edu> wrote: > If .pop were being added today, I would argue against including the index > parameter. GASP! That's no fair! 1) When using pop you normally want to keep the mutability available, so iter(mylist) is a no-go. 2) When using the index, it's often somewhere in the middle that you're popping from 3) There's always deque for deques That said you can always use blist which has O(log n) time complexity for these pops. It's a hassle it's not stdlib :/.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Suggestion: PEP for popping slices from lists Neatu Ovidiu Gabriel <neatuovi@gmail.com> - 2013-08-08 02:45 -0700
Re: Suggestion: PEP for popping slices from lists Peter Otten <__peter__@web.de> - 2013-08-08 12:07 +0200
Re: Suggestion: PEP for popping slices from lists Neatu Ovidiu <neatuovi@gmail.com> - 2013-08-08 03:38 -0700
Re: Suggestion: PEP for popping slices from lists Nicholas Cole <nicholas.cole@gmail.com> - 2013-08-08 12:12 +0100
Re: Suggestion: PEP for popping slices from lists Neatu Ovidiu <neatuovi@gmail.com> - 2013-08-08 04:40 -0700
Re: Suggestion: PEP for popping slices from lists Skip Montanaro <skip@pobox.com> - 2013-08-08 09:20 -0500
Re: Suggestion: PEP for popping slices from lists Neatu Ovidiu <neatuovi@gmail.com> - 2013-08-08 04:44 -0700
Re: Suggestion: PEP for popping slices from lists Neatu Ovidiu <neatuovi@gmail.com> - 2013-08-08 04:50 -0700
Re: Suggestion: PEP for popping slices from lists Nicholas Cole <nicholas.cole@gmail.com> - 2013-08-08 14:08 +0100
Re: Suggestion: PEP for popping slices from lists Neatu Ovidiu <neatuovi@gmail.com> - 2013-08-08 06:32 -0700
Re: Suggestion: PEP for popping slices from lists Nicholas Cole <nicholas.cole@gmail.com> - 2013-08-08 15:03 +0100
Re: Suggestion: PEP for popping slices from lists Terry Reedy <tjreedy@udel.edu> - 2013-08-08 16:03 -0400
Re: Suggestion: PEP for popping slices from lists Joshua Landau <joshua@landau.ws> - 2013-08-08 22:32 +0100
Re: Suggestion: PEP for popping slices from lists Tim Chase <python.list@tim.thechases.com> - 2013-08-08 16:50 -0500
Re: Suggestion: PEP for popping slices from lists Terry Reedy <tjreedy@udel.edu> - 2013-08-08 18:10 -0400
csiph-web