[Python-Dev] Next version of PEP278 - universal newline support - available

Samuele Pedroni pedroni@inf.ethz.ch
Thu, 14 Mar 2002 18:23:08 +0100


From: Skip Montanaro <skip@pobox.com>
> 
>     Guido> I wonder if it would make sense to put a warning when people use
>     Guido> f.read(n) on a file opened in text mode?  I think f.read(n) is an
>     Guido> almost sure sign that they're seeing the file as binary data.
>     Guido> However, f.read() or f.read(-1) is used to slurp in text as well,
>     Guido> so should not trigger the warning.
> 
>     Guido> Opinions?
> 
> Pass this off to PyChecker?
> 
> I guess with the presence of PyChecker I'm getting a bit schizophrenic about
> whether warnings go in the Python byte compiler or in PyChecker.  It warns
> about so many more things now than the compiler as it stands that it seems
> to me to be the more natural place to stick new warnings.
> 
> Skip
> 

mmh, is this supposed to be a compile time warning? don't think so.

Anyway as long as PyChecker does not work with Jython and is not
part of the official distribution, IMO, I would
be more critical about what kind of critical code breakage should be dectected
by Python and what by PyChecker

regards.