[docs] [issue10461] Use with statement throughout the docs

Alexander Belopolsky report at bugs.python.org
Sat Nov 20 19:32:27 CET 2010

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

FWIW, I find the "with" variant much easier to read than

>>> words = re.findall('\w+', open('hamlet.txt').read().lower())

Too many operations in one line.  It would be even better with

>>> words = re.findall('\w+', hamlet_text.lower())


Python tracker <report at bugs.python.org>

More information about the docs mailing list