[docs] Pb de d'essai du code à la section 7.2.1 Methods Of File Objects

Zachary Ware zachary.ware+pydocs at gmail.com
Thu Apr 9 04:22:16 CEST 2015


Hi Vincent,

Sorry for the delay in responding.

2015-03-05 13:01 GMT-06:00 Vincent . <gooogleapps33 at gmail.com>:
> Hello,
>
> When I run this code
> f = open('workfile', 'r')
> f.read()
>
> under python interpreter, it operate.
> in a file, it doesn't work
>
> Please, help to fix this bug which be useful for all readers of your docs.

I'm not sure where you found this, as I can't find it in any current
version of the docs.  However, that code does work properly when run
from a file, but as you're just throwing away the return value of
'f.read()', it *looks* like nothing happens (when running that code in
an interactive session, the return value is printed automatically).

Thanks for the report anyway!

Regards,
-- 
Zach


More information about the docs mailing list