[issue18601] Example "command-line interface to difflib" has typographical error
New submission from Stephen Paul Chappell: 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) ---------- assignee: docs@python components: Demos and Tools, Documentation messages: 193948 nosy: Zero, docs@python priority: normal severity: normal status: open title: Example "command-line interface to difflib" has typographical error versions: Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18601> _______________________________________
Roundup Robot added the comment: 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 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18601> _______________________________________
R. David Murray added the comment: 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. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18601> _______________________________________
Change by Stephen Paul Chappell <Noctis.Skytower@gmail.com>: ---------- nosy: -Zero _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue18601> _______________________________________
participants (3)
-
R. David Murray
-
Roundup Robot
-
Stephen Paul Chappell