[Python-ideas] Boolean value of file object?

anatoly techtonik techtonik at gmail.com
Mon Jan 9 09:35:17 CET 2012


On Sun, Jan 8, 2012 at 5:08 AM, Raymond Hettinger <
raymond.hettinger at gmail.com> wrote:

>
> there is still an important distinction between files that are closed
> versus files that are empty (i.e. they have a length of zero).
>

and `file`s that are None. When you check f.closed explicitly - the None
objects throw an exception.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120109/30275d6c/attachment.html>


More information about the Python-ideas mailing list