Re: [Python-Dev] Keep default comparisons - or add a second set?

2005-12-19 Thread Josiah Carlson
Michael Urman <[EMAIL PROTECTED]> wrote: > > On 12/19/05, Greg Ewing <[EMAIL PROTECTED]> wrote: > > That would be my preference. Comparison for canonical > > ordering should be a distinct operation with its > > own spelling. > > Such as sorted(stuff, key=id)? I believe that ideally, canonical o

Re: [Python-Dev] Keep default comparisons - or add a second set?

2005-12-19 Thread Michael Urman
On 12/19/05, Greg Ewing <[EMAIL PROTECTED]> wrote: > That would be my preference. Comparison for canonical > ordering should be a distinct operation with its > own spelling. Such as sorted(stuff, key=id)? Michael -- Michael Urman http://www.tortall.net/mu/blog ___

Re: [Python-Dev] Keep default comparisons - or add a second set?

2005-12-19 Thread Greg Ewing
Jim Jewett wrote: > Or, at the very least, promote a > *standard* way to say "just get me a canonical ordering of some sort" That would be my preference. Comparison for canonical ordering should be a distinct operation with its own spelling. Then Guido's > Comparisons other than == and !

Re: [Python-Dev] synchronized enumerate

2005-12-19 Thread Raymond Hettinger
[Chris or Leslie Smith] > I see that there is a thread of a similar topic that was posted recently ( > enumerate with a start index ) but thought I would start a new thread > since what I am suggesting is a little different. Try rolling your own with izip() and count(): izip(count(start),

Re: [Python-Dev] Expose Subversion revision number to Python

2005-12-19 Thread Martin v. Löwis
John Pinner wrote: > It's also the only thing that identifes the revision/build precisely, > allowing reversion to a known state. How so? - It doesn't identify a build precisely: you may have dynamically-loaded modules that get rebuild even though the build number doesn't change. So a single b

Re: [Python-Dev] synchronized enumerate

2005-12-19 Thread Nick Coghlan
Chris or Leslie Smith wrote: > Whenever I use enumerate, I am doing so because I will use the index to > access some other element in the list (the previous or next, usually) while > also looking at the element that is returned from enumerate. Several > times, however, in the development phase of

Re: [Python-Dev] Keep default comparisons - or add a second set?

2005-12-19 Thread Paul Moore
On 12/19/05, Jim Jewett <[EMAIL PROTECTED]> wrote: > Unfortunately, one very common use case of comparisons is to get a > canonical order. If the order is sensible, all the better, but that > is not strictly required. One of Python's selling points (especially > compared to Java) is that getting

[Python-Dev] Keep default comparisons - or add a second set?

2005-12-19 Thread Jim Jewett
PEP 3000 now suggests that dropping default comparison has become more than an idle what-if. Unfortunately, one very common use case of comparisons is to get a canonical order. If the order is sensible, all the better, but that is not strictly required. One of Python's selling points (especially

Re: [Python-Dev] Expose Subversion revision number to Python

2005-12-19 Thread John Pinner
> > Barry Warsaw wrote: > >>On Sun, 2005-12-18 at 19:19 +0100, "Martin v. L?wis" wrote: >> >> >> >>>It stopped counting builds on Windows quite some time ago; perhaps it >>>is best to drop the build number entirely? >> >> >>I think so, because it doesn't really convey anything useful. >> > > I t

Re: [Python-Dev] synchronized enumerate

2005-12-19 Thread Aahz
On Sun, Dec 18, 2005, Chris or Leslie Smith wrote: > > What I would propose is an optional slice argument to the enumerate > routine that would allow enumerate to return elements that are > synchronized with the original list list/iterable elements. e.g. python-dev is the wrong place to start disc

[Python-Dev] synchronized enumerate

2005-12-19 Thread Chris or Leslie Smith
I see that there is a thread of a similar topic that was posted recently ( enumerate with a start index ) but thought I would start a new thread since what I am suggesting is a little different. Whenever I use enumerate, I am doing so because I will use the index to access some other element i

Re: [Python-Dev] Expose Subversion revision number to Python

2005-12-19 Thread Steve Holden
Barry Warsaw wrote: > On Sun, 2005-12-18 at 19:19 +0100, "Martin v. Löwis" wrote: > > >>It stopped counting builds on Windows quite some time ago; perhaps it >>is best to drop the build number entirely? > > > I think so, because it doesn't really convey anything useful. > I thought it was more

Re: [Python-Dev] fixing log messages

2005-12-19 Thread Steve Holden
Fredrik Lundh wrote: > just noticed an embarrasing misspelling in one of my recent checkins, only That's "embarrassing", by the way. You're obviously having a bad spelling day :-) not-throwing-stones-ly y'rs - steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC