[Python-Dev] Path PEP: some comments (original) (raw)

Giovanni Bajo rasky at develer.com
Sat Feb 4 20:35:43 CET 2006


Hello,

my comments on the Path PEP:

for L in Path("foo.txt").readlines(): print L, ===> f = open(Path("foo.txt"), "rU") try: for L in f: print L finally: f.close()

import fileinput for L in fileinput.FileInput("foo.txt", inplace=True, backup=True): print "(modified) " + L, ====> for L in Path("foo.txt").replacelines(backup=True): print "(modified) " + L,

Thanks for working on this!

Giovanni Bajo



More information about the Python-Dev mailing list