Guido van Rossum wrote: > We might be able to get there halfway in Python 2.x: we could > introduce the bytes type now, and provide separate APIs to read and > write them. (In fact, the array module and the f.readinto() method > make this possible today, but it's too klunky so nobody uses it. > Perhaps a better API would be a new file-open mode ("B"?) to indicate > that a file's read* operations should return bytes instead of strings. > The bytes type could just be a very thin wrapper around array('b').
That answers an important question: so you want the bytes type to be mutable (and, consequently, unsuitable as a dictionary key). Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com