Re: enhancing 'list'

2010-01-19 Thread Steve Holden
samwyse wrote: On Jan 18, 1:56 am, Terry Reedy tjre...@udel.edu wrote: On 1/17/2010 5:37 PM, samwyse wrote: Consider this a wish list. I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've

Re: enhancing 'list'

2010-01-18 Thread Peter Otten
samwyse wrote: Lately, I've slinging around a lot of lists, and there are some simple things I'd like to do that just aren't there. s.count(x[, cmp[, key]]) - return number of i‘s for which s[i] == x. 'cmp' specifies a custom comparison function of two arguments, as in '.sort'. 'key'

Re: enhancing 'list'

2010-01-18 Thread samwyse
On Jan 18, 1:56 am, Terry Reedy tjre...@udel.edu wrote: On 1/17/2010 5:37 PM, samwyse wrote: Consider this a wish list.  I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've slinging around a

Re: enhancing 'list'

2010-01-18 Thread samwyse
On Jan 18, 3:06 am, Peter Otten __pete...@web.de wrote: samwyse wrote: Lately, I've slinging around a lot of lists, and there are some simple things I'd like to do that just aren't there. s.count(x[, cmp[, key]]) - return number of i‘s for which s[i] == x.  'cmp' specifies a custom

Re: enhancing 'list'

2010-01-18 Thread samwyse
On Jan 17, 11:30 pm, Asun Friere afri...@yahoo.co.uk wrote: On Jan 18, 9:37 am, samwyse samw...@gmail.com wrote: Consider this a wish list.  I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've

Re: enhancing 'list'

2010-01-18 Thread Peter Otten
samwyse wrote: On Jan 18, 3:06 am, Peter Otten __pete...@web.de wrote: samwyse wrote: Lately, I've slinging around a lot of lists, and there are some simple things I'd like to do that just aren't there. s.count(x[, cmp[, key]]) - return number of i‘s for which s[i] == x. 'cmp'

Re: enhancing 'list'

2010-01-18 Thread samwyse
On Jan 18, 6:20 am, Peter Otten __pete...@web.de wrote: Note that the cmp() builtin and the cmp parameter for list.sort() are gone in Python 3. I've got Python 3 installed, and am using it for most new development. In this case case, however, I'm writing for the Google App Engine, which is

Re: enhancing 'list'

2010-01-18 Thread Stefan Behnel
samwyse, 18.01.2010 13:49: Curiously, no matter how I order my PATH, the wrong version seems to appear first more than half the time! I'm seriously considering renaming all my Python 3 code to use a .py3 file extension. You should be able to start the interpreter as python3.1 to be sure.

enhancing 'list'

2010-01-17 Thread samwyse
Consider this a wish list. I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've slinging around a lot of lists, and there are some simple things I'd like to do that just aren't there. s.count(x[, cmp[,

Re: enhancing 'list'

2010-01-17 Thread Asun Friere
On Jan 18, 9:37 am, samwyse samw...@gmail.com wrote: Consider this a wish list.  I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've slinging around a lot of lists, and there are some simple things

Re: enhancing 'list'

2010-01-17 Thread Terry Reedy
On 1/17/2010 5:37 PM, samwyse wrote: Consider this a wish list. I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've slinging around a lot of lists, and there are some simple things I'd like to do that