[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

[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:

[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:

[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.br