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: [easy] undefined name in Lib/idlelib/zzdummy.py
Type: Stage: resolved
Components: IDLE Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: terry.reedy, vstinner
Priority: normal Keywords: newcomer friendly, patch

Created on 2020-04-30 23:48 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20093 merged vstinner, 2020-05-14 22:30
Messages (4)
msg367810 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-04-30 23:48
pyflakes found the following issue:

Lib/idlelib/zzdummy.py:31:33 undefined name 'ztest'

Code:

ztext = idleConf.GetOption('extensions', 'ZzDummy', 'z-text')
(...)
        for line in range(1, text.index('end')):
            text.insert('%d.0', ztest)

Maybe it's a typo: ztext instead of ztest? I'm not sure.
msg367834 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-05-01 10:10
Yes, simple typo.  I need to look at test_Zzdummy.py to see if it should have been failing with the typo.  If this is executed, the end index must be 1 so that the loop never executes.
msg368871 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-14 22:51
New changeset edf2643bbb9859403239fe1cb3c212b1a2a8e65c by Victor Stinner in branch 'master':
bpo-40460: Fix typo in idlelib/zzdummy.py (GH-20093)
https://github.com/python/cpython/commit/edf2643bbb9859403239fe1cb3c212b1a2a8e65c
msg368872 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-14 22:53
> Yes, simple typo.

Ok, thanks for the confirmation :-) It's now fixed.
History
Date User Action Args
2022-04-11 14:59:30adminsetgithub: 84640
2020-05-14 22:53:31vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg368872

stage: patch review -> resolved
2020-05-14 22:51:58vstinnersetmessages: + msg368871
2020-05-14 22:30:48vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request19399
2020-05-01 10:10:57terry.reedysetmessages: + msg367834
2020-04-30 23:48:17vstinnercreate