[Tutor] style ok?

Menno Simons mennosimons@gmx.net
Tue, 2 Apr 2002 17:14:34 +0200


Ups, I have just seen a bug there...

for name in files:
     f = open(name, "r+")
     content = f.readlines()

     content[0:0] = id
     content[-1:] = log

has to be

for name in files:
     f = open(name, "r+")
     content = f.readlines()

     content[0:0] = id
     content.append(log)

else the last original line will be deleted.

willi