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/2001-November/018776.html below:

[Python-Dev] Re: _PyTuple_Resize() in 2.2

[Python-Dev] Re: _PyTuple_Resize() in 2.2Neil Schemenauer nas@python.ca
Thu, 29 Nov 2001 15:05:10 -0800
Gustavo Niemeyer wrote:
> Python 2.1 (#1, Jun 22 2001, 17:13:13) 
> [GCC 2.95.3 20010315 (release) (conectiva)] on linux-i386
> Type "copyright", "credits" or "license" for more information.
> >>> open("/etc").readline()
> ''

I'm pretty sure patch 2.117 to fileobject.c caused this change in
behavior.  Here is the log message:

    date: 2001/08/09 18:14:59;  author: gvanrossum;  state: Exp;  lines: +6 -0
    Apply anonymous SF patch #441229.

      Previously, f.read() and f.readlines() checked for
      errors on their file object and possibly raised an
      IOError, but f.readline() didn't. This patch makes
      f.readline() behave like the others.

    Note that I've added a call to clearerr() since the other calls to
    ferror() include that too.

    I have no way to test this code. :-)

Try open("/etc").read() with 2.1.  I get an IOError exception.

  Neil



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