[Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader

Victor Stinner victor.stinner at haypocalc.com
Wed May 25 18:04:17 CEST 2011

Le mercredi 25 mai 2011 à 13:10 +0200, Victor Stinner a écrit :
> codecs is always faster (between 1.07 and 1.15 times faster than io) to
> read the whole content of file using read(-1). Something should maybe be
> optimized in TextIOWrapper.read() ;-)

Oh, I understood: it's maybe the universal newline mode of TextIOWrapper
was enabled. If you disable is using open(..., newline='\n'), io and
codecs run at the same speed to read the whole content of the file


More information about the Python-Dev mailing list