[Python-3000] Immutable bytes type and dbm modules

Guido van Rossum guido at python.org
Thu Aug 9 18:36:27 CEST 2007


On 8/9/07, Joel Bender <jjb5 at cornell.edu> wrote:
> Jason Orendorff wrote:
>
> > Hooks would help with that, or even eliminate the need altogether.
>
> IMHO, having a __bytes__ method would go a long way.

I've heard this before, but there are many different, equally
attractive ways to serialize objects to bytes (e.g. marshal, pickle,
repr + encode, etc.).

Bytes are not the same as strings, and you need to think differently about them.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list