Who told str() to round my int()'s!!!
Neil Cerutti
horpner at yahoo.com
Thu Aug 16 11:59:33 EDT 2007
On 2007-08-16, John Nagle <nagle at animats.com> wrote:
>>>or the mildy amusing "how do I write bytes not characters to a
>>>file" questions at least once a week on this forum.
>
> Actually, that's a reasonable question, and one that Python didn't do
> quite right.
>
> Remember, in the beginning, Python had only ASCII strings, which
> were equivalent to arrays of bytes. Then came Unicode strings. Then
> came the restriction of ASCII chars to 0..127. Except that you can
> still store binary bytes in ASCII strings, subject to some limitations.
>
> The next logical step is a complete separation of binary data handling
> from text string handling, probably using some type in "numarray" for
> arrays of bytes.
Python 3000 makes unicode the standard string type, and ushers in
a new type name for the old str type called, I think, 'bytes'. So
the 3000 devs seem to agree with you to some extent.
--
Neil Cerutti
Ushers will eat latecomers. --Church Bulletin Blooper
More information about the Python-list
mailing list