This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Example "command-line interface to difflib" has typographical error
Type: behavior Stage: resolved
Components: Demos and Tools, Documentation Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, python-dev, r.david.murray
Priority: normal Keywords:

Created on 2013-07-30 19:07 by Zero, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg193948 - (view) Author: Stephen Paul Chappell (Zero) Date: 2013-07-30 19:07
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)
msg193949 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-30 19:38
New changeset 0e1f0faacb0d by R David Murray in branch '3.3':
#18601: fix error made when difflib example was converted to use 'with'.
http://hg.python.org/cpython/rev/0e1f0faacb0d

New changeset c4f377d710da by R David Murray in branch 'default':
Merge: #18601: fix error made when difflib example was converted to use 'with'.
http://hg.python.org/cpython/rev/c4f377d710da
msg193950 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-07-30 19:39
Thanks for the report.  Actually that first 'fromlines' should be 'fromfile'.  Looks like someone made a typo when converting the example to use the 'with' statement.
History
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62801
2019-10-31 14:23:16Zerosetnosy: - Zero
2013-07-30 19:39:28r.david.murraysetstatus: open -> closed

type: behavior

nosy: + r.david.murray
messages: + msg193950
resolution: fixed
stage: resolved
2013-07-30 19:38:02python-devsetnosy: + python-dev
messages: + msg193949
2013-07-30 19:07:26Zerocreate