mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Generalize file.writelines() to allow iterable objects.
This commit is contained in:
parent
d31db7e939
commit
2c9aa5ea8d
5 changed files with 92 additions and 36 deletions
|
@ -118,8 +118,7 @@ def main(args):
|
|||
|
||||
def restore(which):
|
||||
restored = difflib.restore(sys.stdin.readlines(), which)
|
||||
for line in restored:
|
||||
print line,
|
||||
sys.stdout.writelines(restored)
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = sys.argv[1:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue