Re: [Python-Dev] order of Misc/ACKS

2011-11-12 Thread Larry Hastings
On 11/11/2011 11:03 PM, Stephen J. Turnbull wrote: The sensible thing is to just sort in Unicode code point order, I think. I was going to suggest the official Unicode Collation Algorithm: http://unicode.org/reports/tr10/ But I peeked in the can, saw it was chock-a-block with worms, and d

Re: [Python-Dev] order of Misc/ACKS

2011-11-12 Thread Georg Brandl
Am 12.11.2011 08:03, schrieb Stephen J. Turnbull: > Eli Bendersky writes: > > > special locale. It makes me wonder whether it's possible to have a > > contradiction in the ordering, i.e. have a set of names that just > > can't be sorted in any order acceptable by everyone. > > Yes, it is. The

Re: [Python-Dev] order of Misc/ACKS

2011-11-12 Thread Barry Warsaw
On Nov 12, 2011, at 04:03 PM, Stephen J. Turnbull wrote: >The sensible thing is to just sort in Unicode code point order, I >think. M-x sort-lines-by-unicode-point-order RET -Barry ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.

Re: [Python-Dev] order of Misc/ACKS

2011-11-12 Thread Xavier Morel
On 2011-11-12, at 10:24 , Georg Brandl wrote: > Am 12.11.2011 08:03, schrieb Stephen J. Turnbull: >> Eli Bendersky writes: >> >>> special locale. It makes me wonder whether it's possible to have a >>> contradiction in the ordering, i.e. have a set of names that just >>> can't be sorted in any orde

Re: [Python-Dev] Merging 3.2 to 3.3 is messy because "Misc/NEWS"

2011-11-12 Thread Éric Araujo
Hi, My usual merge tool is vimdiff, with a little configuration so that it shows only two panes instead of three (destination file on the left, file from the other branch on the right, and if I need to compare either with the common ancestor to see which chunks I want from each file, I use a

Re: [Python-Dev] documenting the Hg commit message hooks in the devguide

2011-11-12 Thread Eli Bendersky
>> Our Hg repo has some useful hooks on commit messages that allow to >> specify which issue to notify for commits, and which issue to close. >> AFAIU, it's currently documented only in the code of the hook >> (http://hg.python.org/hooks/file/tip/hgroundup.py). >> >> I think adding a short descript

[Python-Dev] Hashable memoryviews

2011-11-12 Thread Antoine Pitrou
Hello everyone and Benjamin, Currently, memoryview objects are unhashable: >>> hash(memoryview(b"")) Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'memoryview' Compare with Python 2.7: >>> hash(buffer("")) 0 memoryviews already support equality comparis

Re: [Python-Dev] Hashable memoryviews

2011-11-12 Thread Guido van Rossum
Aren't memoryview objects mutable? I think that the underlying memory can change, so it shouldn't be hashable. On Sat, Nov 12, 2011 at 4:23 PM, Antoine Pitrou wrote: > > Hello everyone and Benjamin, > > Currently, memoryview objects are unhashable: > hash(memoryview(b"")) > Traceback (most r

Re: [Python-Dev] Hashable memoryviews

2011-11-12 Thread Antoine Pitrou
On Sat, 12 Nov 2011 17:15:08 -0800 Guido van Rossum wrote: > Aren't memoryview objects mutable? I think that the underlying memory > can change, so it shouldn't be hashable. Only if the original object is itself mutable, otherwise the memoryview is read-only. I would propose the following algori

Re: [Python-Dev] Hashable memoryviews

2011-11-12 Thread Nick Coghlan
On Sun, Nov 13, 2011 at 11:19 AM, Antoine Pitrou wrote: > On Sat, 12 Nov 2011 17:15:08 -0800 > Guido van Rossum wrote: >> Aren't memoryview objects mutable? I think that the underlying memory >> can change, so it shouldn't be hashable. > > Only if the original object is itself mutable, otherwise

Re: [Python-Dev] Hashable memoryviews

2011-11-12 Thread Antoine Pitrou
Thinking of it, an alternative would be to implement lazy slices of bytes objects (Twisted uses buffer() for zero-copy slices). Regards Antoine. On Sun, 13 Nov 2011 01:23:59 +0100 Antoine Pitrou wrote: > > Hello everyone and Benjamin, > > Currently, memoryview objects are unhashable: > > >

Re: [Python-Dev] Hashable memoryviews

2011-11-12 Thread Guido van Rossum
On Sat, Nov 12, 2011 at 5:40 PM, Nick Coghlan wrote: > On Sun, Nov 13, 2011 at 11:19 AM, Antoine Pitrou wrote: >> On Sat, 12 Nov 2011 17:15:08 -0800 >> Guido van Rossum wrote: >>> Aren't memoryview objects mutable? I think that the underlying memory >>> can change, so it shouldn't be hashable. >