Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread Guido van Rossum
On 4/22/06, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > On Sun, Apr 23, 2006 at 01:28:06AM +0200, guido.van.rossum wrote: > > +bytes_nohash(PyObject *self) > > +{ > > +PyErr_SetString(PyExc_TypeError, "bytes objects are unhashable"); > > +return -1; > > +} > > I think we might need to hav

Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread skip
>> I think we might need to have a frozenbytes object too. Guido> I believe YAGNI. Also, I'm not keen on all these frozen variants. Guido> Hands up who's ever used a frozen set or needed a frozen dict? On the rare occasion where I've wanted to use a dict (for example) as a key in ano

Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread Neil Schemenauer
On Tue, Apr 25, 2006 at 09:52:34AM -0700, Guido van Rossum wrote: > On 4/22/06, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > > On Sun, Apr 23, 2006 at 01:28:06AM +0200, guido.van.rossum wrote: > > > +bytes_nohash(PyObject *self) > > > +{ > > > +PyErr_SetString(PyExc_TypeError, "bytes objects a

Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread Guido van Rossum
On 4/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >> I think we might need to have a frozenbytes object too. > > Guido> I believe YAGNI. Also, I'm not keen on all these frozen variants. > Guido> Hands up who's ever used a frozen set or needed a frozen dict? > > On the rare oc

Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread Guido van Rossum
On 4/25/06, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > On Tue, Apr 25, 2006 at 09:52:34AM -0700, Guido van Rossum wrote: > > On 4/22/06, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > > > On Sun, Apr 23, 2006 at 01:28:06AM +0200, guido.van.rossum wrote: > > > > +bytes_nohash(PyObject *self) > > >

Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread Walter Dörwald
Guido van Rossum wrote: > On 4/22/06, Neil Schemenauer <[EMAIL PROTECTED]> wrote: >> On Sun, Apr 23, 2006 at 01:28:06AM +0200, guido.van.rossum wrote: >>> +bytes_nohash(PyObject *self) >>> +{ >>> +PyErr_SetString(PyExc_TypeError, "bytes objects are unhashable"); >>> +return -1; >>> +} >> I

Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread Neil Schemenauer
On Tue, Apr 25, 2006 at 11:33:34AM -0700, Guido van Rossum wrote: > Have you ever encountered that use case in practice? (That's what I > meant by YAGNI. :-) Yes, I know what YAGNI means. The example that immediately comes to mind is ZODB and Durus. They use 8-byte binary strings to represent ob

Re: [Python-3000-checkins] r45652 - in python/branches/p3yk

2006-04-25 Thread Fred L. Drake, Jr.
On Tuesday 25 April 2006 16:19, Neil Schemenauer wrote: > Yes, I know what YAGNI means. The example that immediately comes to > mind is ZODB and Durus. They use 8-byte binary strings to represent > object IDs. Memory efficiency is important. > > Another example would be using a SHA-1 hash a