[issue6519] Reorder 'with' statement for files in Python Tutorial

Jerzy Jalocha N report at bugs.python.org
Sun Jul 19 03:19:29 CEST 2009


New submission from Jerzy Jalocha N <jjalocha at gmail.com>:

Actually, the Python Tutorial recommends the use of the 'with' statement
in Section 7.2.1. "Methods of File Objects":

> It is good practice to use the with keyword when dealing with file
> objects. [etc.]

But the example and description are at the very bottom of this very
large section, and are easily missed by new Python users.

If this suggestion is to be taken seriously, I suggest putting this
information at a more prominent place, somewhere at the top of the short
section 7.2. "Reading and Writing Files".

----------
assignee: georg.brandl
components: Documentation
messages: 90698
nosy: georg.brandl, jjalocha
severity: normal
status: open
title: Reorder 'with' statement for files in Python Tutorial
type: feature request
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6519>
_______________________________________


More information about the Python-bugs-list mailing list