On 9/16/07, Paul Moore <[EMAIL PROTECTED]> wrote:
> On 16/09/2007, Fred Drake <[EMAIL PROTECTED]> wrote:
> > On Sep 15, 2007, at 10:00 PM, Nicholas Bastin wrote:
> > > Then lets stop beating around the bush and implement an immutable
> > > bytes type.  Why put ourselves through contortions trying to jam a
> > > square peg into a round hole and not just decide to make a round peg?
> >
> > +42 !!!!
>
> I knew this would come up again when I made that comment - I
> deliberately didn't express an opinion then, as I didn't want to
> obscure the point. But I'll come off the fence and admit that I'm also
> in favour of an immutable bytes type (and for bytes literals to be of
> that type).
>
> Paul.

FYI - my first patch in the bytes object support for PyBUF_LOCKDATA
thread added support for immutable bytes.  I didn't add a hash method
yet but that should be trivial.

Should the hash method raise an exception when set_immutable has not
been called yet or should it call set_immutable?  I'm in favor of the
exception.  side effects are bad.

-gps
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to