[Python-3000] Immutable bytes type and dbm modules

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Aug 7 11:01:42 CEST 2007


Martin v. Löwis wrote:
> Code that has been ported to the bytes type probably doesn't use it
> correctly yet, but to me, the need for a buffery thing where you
> can allocate some buffer, and then fill it byte-for-byte is quite
> obvious.

We actually already *have* something like that,
i.e. array.array('B').

So I don't think it's a priori a silly idea to
consider making the bytes type immutable only,
and using the array type for when you want a
mutable buffer.

--
Greg


More information about the Python-3000 mailing list