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
>> 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
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
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
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)
> > >
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
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
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