[issue8518] small typo in http://docs.python.org/howto/doanddont.html

2010-04-24 Thread Adrián Deccico

New submission from Adrián Deccico :

Hi, in this document: 

Idioms and Anti-Idioms in Python

In the "except" section, where it says:

"The example above is better written"

it should said: 

"The example below is better written"

--
assignee: georg.brandl
components: Documentation
messages: 104091
nosy: Adrián.Deccico, georg.brandl
severity: normal
status: open
title: small typo in http://docs.python.org/howto/doanddont.html
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue8518>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8518] small typo in http://docs.python.org/howto/doanddont.html

2010-04-24 Thread Adrián Deccico

Adrián Deccico  added the comment:

Hi Georg,

Ok, so perhaps the text is a little confusing. Perhaps it would be a
good idea to add a colon or as you state the words "like this"

thanks

On Sat, Apr 24, 2010 at 4:35 PM, Georg Brandl  wrote:
>
> Georg Brandl  added the comment:
>
> The text is correct as-is; the meaning is "The example that is shown above is 
> better written like this:".
>
> --
> resolution:  -> works for me
> status: open -> closed
>
> ___
> Python tracker 
> <http://bugs.python.org/issue8518>
> ___
>

--

___
Python tracker 
<http://bugs.python.org/issue8518>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8522] enhacement proposal in http://docs.python.org/howto/doanddont.html

2010-04-24 Thread Adrián Deccico

New submission from Adrián Deccico :

Hi, in "Exceptions" section. 

Instead of using:

def get_status(file):
fp = open(file)
try:
return fp.readline()
finally:
fp.close()

Why no suggest this method:

def get_status(file):
with open(file) as fp:
return fp.readline()


which will properly close the file.

--
assignee: d...@python
components: Documentation
messages: 104111
nosy: Adrián.Deccico, d...@python
severity: normal
status: open
title: enhacement proposal in http://docs.python.org/howto/doanddont.html
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue8522>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8522] enhacement proposal in howto/doanddont

2010-04-24 Thread Adrián Deccico

Adrián Deccico  added the comment:

Hi, you are right. I am attaching the patch. I tested against 2.6.5 and trunk 
(the file has no changed)

thanks

--
keywords: +patch
Added file: http://bugs.python.org/file17072/doanddont.rst.patch

___
Python tracker 
<http://bugs.python.org/issue8522>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com