[Python-3000] Python 3.0a2 release
Guido van Rossum
guido at python.org
Tue Nov 20 00:44:23 CET 2007
On Nov 19, 2007 3:06 PM, Amaury Forgeot d'Arc <amauryfa at gmail.com> wrote:
> Guido van Rossum wrote:
> > Is there anything that you (or anyone else!) would really like to see
> > added to or fixed in 3.0a2? Now's the time!
> I am currently having a look at http://bugs.python.org/issue1460 .
> It's a problem in the utf-7 decoder (there is no such function
> PyUnicode_DecodeUTF7Stateful), but I was surprised to see that
> codec.StreamReader duplicates a lot of code already present in io.py:
> an underlying binary stream, a decoder, a buffer (of 72 chars), some
> code to handle \r\n and so on.
> I wonder if it is possible to remove this class: are there differences
> between codec.StreamReader and io.TextIOWrapper ?
Good point. The redundancy is historic; StreamReader is older, and
performed the same function in 2.x that TextIOWrapper performs in 3.x,
but the latter was written from scratch (and in fact without looking
at the former) to match the API provided by text files in 2.x more
closely. If you see anything in StreamReader that could make
TextIOWrapper faster, I'd love to hear about it. I expect that in 3.0
final, the classes in codecs will probably be implemented using
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000