On Thu, Mar 14, 2002, Guido van Rossum wrote: > > I wonder if it would make sense to put a warning when people use > f.read(n) on a file opened in text mode? I think f.read(n) is an > almost sure sign that they're seeing the file as binary data. > However, f.read() or f.read(-1) is used to slurp in text as well, so > should not trigger the warning. > > Opinions? +1 Warnings for something we know to be a problem are "always" good. The only worry is CGI scripts, but even then warnings go to stderr, right? -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ The best way to get information on Usenet is not to ask a question, but to post the wrong information. --Aahz
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