This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python tutorial error
Type: Stage:
Components: None Versions: Python 2.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Tsuedesu, georg.brandl
Priority: normal Keywords:

Created on 2009-02-23 13:45 by Tsuedesu, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg82628 - (view) Author: Tsue (Tsuedesu) Date: 2009-02-23 13:45
Hi,

Dont know if this is the right place for this kind of bug report. I just
started with python last week, so I've been using the Built in tutorial.
However, I came across a major issue, and though it took me a while, I
figured it out.

The excersise on Reading and Writing Files isnt very clear on the object
f. And it isnt even stated, that the use of 'w' in the code will
actually over right the file, not append to it. Which didnt seem
logical, but I guess thats why 'r+' is there.

Please correct this in the docs, its a bit frustrating for a nooob.
msg82629 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-02-23 13:47
What exactly would you want to change? There's a parenthetical remark
"an existing file with the same name will be erased" just after the 'w'
is described.
msg82631 - (view) Author: Tsue (Tsuedesu) Date: 2009-02-23 14:03
Hi Georg,

Needs to be clearer... Everything else up until this point is easy to
read and understand. I think its more and issue of suddenly changing
the structure of the text than the text itself. It actually feels
rushed. One major thing, for me at least, at Methods of File object -
it sudden expects that I have loaded an object 'f', the real odd
thing, it doesnt say that this file should contain some lines. See,
this is a tutorial, and up until here, it seemed to assume
non-programmer audience.

Be clearer, that's all I'm really asking.

BTW: Thanks for the create work, I look forward to learning more about
Python and programming in it.

Tsue.
(I know I'm a noob and a pain)

On Mon, Feb 23, 2009 at 3:47 PM, Georg Brandl <report@bugs.python.org> wrote:
>
> Georg Brandl <georg@python.org> added the comment:
>
> What exactly would you want to change? There's a parenthetical remark
> "an existing file with the same name will be erased" just after the 'w'
> is described.
>
> ----------
> nosy: +georg.brandl
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue5351>
> _______________________________________
>
msg82645 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-02-23 21:52
I'm sorry, but isn't it a bit nonsensical to talk about file I/O if you
don't have files that contain anything? Also, it should be clear that
the object "f" is just the same that was opened before.

Yes, this is a tutorial, but no, it is not meant to educate a person
completely new to computers about files etc.
msg82659 - (view) Author: Tsue (Tsuedesu) Date: 2009-02-24 07:10
I'm not new to computers, but I am very new to python and its
symantics. I dont mean to be silly about this, but I do think little
things count in the world. If lets say the file being loaded was the
README file, then at least there would be some material to display.
I'm simply saying, the tutorial does not actual show what happens, it
implies the reader has some knowledge of programming and what is
required to do the tutorial and get the same outputs. I dont read
minds, and I only figured out what was going on after watching the
file byte size go to zero, or destroying a copy of the README file. It
would simply be good writing to be more explicit and accurate, more
detail is better than less. If this is an issue in improving the
tutorial, then, I have been asking too much.

- just on a side note, does the file need to be reloaded each time an
EOF is reached when using f.read or f.readlines?

Tsue.

On Mon, Feb 23, 2009 at 11:52 PM, Georg Brandl <report@bugs.python.org> wrote:
>
> Georg Brandl <georg@python.org> added the comment:
>
> I'm sorry, but isn't it a bit nonsensical to talk about file I/O if you
> don't have files that contain anything? Also, it should be clear that
> the object "f" is just the same that was opened before.
>
> Yes, this is a tutorial, but no, it is not meant to educate a person
> completely new to computers about files etc.
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue5351>
> _______________________________________
>
msg85519 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-05 15:25
I still think that the section covers basic file I/O quite well, and
since this is not Python-specific at all, you'll be better served with
an introduction to programming in general if you want to know all about
working with files.
History
Date User Action Args
2022-04-11 14:56:46adminsetgithub: 49601
2009-04-05 15:25:14georg.brandlsetstatus: open -> closed
resolution: wont fix
messages: + msg85519
2009-02-24 07:10:56Tsuedesusetmessages: + msg82659
2009-02-23 21:52:14georg.brandlsetmessages: + msg82645
2009-02-23 14:03:02Tsuedesusetmessages: + msg82631
2009-02-23 13:47:53georg.brandlsetnosy: + georg.brandl
messages: + msg82629
2009-02-23 13:45:33Tsuedesucreate