Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: open() and EOFError Date: Mon, 07 Jul 2014 17:04:12 +1200 Lines: 11 Message-ID: References: <53ba11fc$0$29985$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net UR/SjRaCGjd6cr9ydys+PwbpJOJKFc7jEhh1pGMD2Reg5QOpe+ Cancel-Lock: sha1:+kh9mItLy5T9twUFHFEYXOzqDQk= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: <53ba11fc$0$29985$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:74074 Steven D'Aprano wrote: > Are there any circumstances where merely *opening* a file (before reading > it) can raise EOFError? I don't think so. As far as I know, the only built-in thing that raises EOFError is input() (and raw_input() in Py2). -- Greg