Issue 18601: Example "command-line interface to difflib" has typographical error (original) (raw)

The example at the bottom is good but has a line with a bad variable it is name. It says:

with open(fromlines) as fromf, open(tofile) as tof:
    fromlines, tolines = list(fromf), list(tof)

In the first line, fromlines does no even exist yet. should say:

with open(fromlines) as fromf, open(tofile) as tof:
    from, tolines = list(fromf), list(tof)