[Python-Dev] Re: adding a bytes sequence type to Python

Phillip J. Eby pje at telecommunity.com
Tue Aug 17 17:48:04 CEST 2004


At 08:31 AM 8/17/04 -0700, Guido van Rossum wrote:
> > Is this getting to (hopefully uncontroverisal!) PEP time?
>
>Sure.
>
> > Is there any consensus forming on whether bytes() instances are
> > mutable or not?
>
>Mutable!


So, how will it be different from:

     from array import array

     def bytes(*initializer):
         return array('B',*initializer)

Even if it's desirable for 'bytes' to be an actual type (e.g. subclassing 
ArrayType), it might help the definition process to describe the difference 
between the new type and a byte array.



More information about the Python-Dev mailing list