A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-May/111659.html below:

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

[Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader [Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReaderVictor 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
(f.read()).

Victor

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4