Sorry, that was an unfortunate typo. bytes are Mutable. (It's the same as in Java, really.)
On 2/21/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > Are bytes supposed to be mutable? > > Josiah: > > even be changed to *take* a bytes object as the destination buffer > > Guido: > > This already works -- bytes support the buffer API. > > but later: > > > I think you misunderstood the plans for bytes. The plan is for the > > performance with bytes to scream, in part because they are immutable > > so one would occasionally save copying a buffer an extra time. > > Or did you mean that (C code only?) could pass a newly constructed > bytes object to be filled in? > > Josiah mentioned several dropped methods (append, extend, remove, pop) > that don't really make sense with an immutable. Was this just a > set-difference observation, or are those methods you actually need on > a bytes type? Even though bytes are mutable sequences, I'm not sure that they need to support every method that lists have. I expect an in-place += operator solves most needs. Slices copy. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
