RE: [Python-Dev] adding key argument to min and max

2004-12-01 Thread Raymond Hettinger
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python-dev- > [EMAIL PROTECTED] On Behalf Of Steven Bethard > Sent: Wednesday, December 01, 2004 4:04 PM > To: [EMAIL PROTECTED] > Subject: [Python-Dev] adding key argument to min and max > > This is my firs

Re: [Python-Dev] adding key argument to min and max

2004-12-01 Thread Guido van Rossum
> > I don't want to put words into your mouth, so is this a vote against a > > key= argument for min and max? > > Right. I don't think there is any need. Hm, min and max are probably needed 2-3 orders of magnitude more frequently than nsmallest/nlargest. So I think it's reasonable to add the key

RE: [Python-Dev] adding key argument to min and max

2004-12-01 Thread Raymond Hettinger
> I don't want to put words into your mouth, so is this a vote against a > key= argument for min and max? Right. I don't think there is any need. > If nsmallest/nlargest get key= arguments, this would definitely cover > the same cases. Right. > If a key= argument gets vetoed for min and ma

Re: [Python-Dev] adding key argument to min and max

2004-12-01 Thread Steven Bethard
Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [Steven Bethard] > > For Python 2.5, I'd like to add a keyword argument 'key' to min and > > max like we have now for list.sort and sorted. > . . . > > This means that a 'key' > > argument can *only* be specified as a keyword parameter, thus giving >

RE: [Python-Dev] adding key argument to min and max

2004-12-01 Thread Raymond Hettinger
[Steven Bethard] > For Python 2.5, I'd like to add a keyword argument 'key' to min and > max like we have now for list.sort and sorted. . . . > This means that a 'key' > argument can *only* be specified as a keyword parameter, thus giving > us the asymmetry we see in these examples. FWIW, in Py2

Re: [Python-Dev] adding key argument to min and max

2004-12-01 Thread Phillip J. Eby
At 02:03 PM 12/1/04 -0700, Steven Bethard wrote: Is it okay to have a parameter that is *only* accessable as a keyword parameter? Yes. ___ Python-Dev mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://ma

[Python-Dev] adding key argument to min and max

2004-12-01 Thread Steven Bethard
This is my first post to Python dev, so I figured I should introduce myself. My name's Steven Bethard and I'm a computer science Ph.D. student at the University of Colorado at Boulder working primarily in the areas of natural language processing and machine learning. During my undergrad at the Un