Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32916

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users
Type:enhancementStage:resolved
Components:IDLEVersions:Python 3.8, Python 3.7, Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: terry.reedyNosy List: cheryl.sabella, miss-islington, terry.reedy
Priority:normalKeywords:patch

Created on2018-02-23 00:56 byterry.reedy, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 5830mergedcheryl.sabella,2018-02-23 12:36
PR 5844mergedmiss-islington,2018-02-24 02:35
PR 5845mergedmiss-islington,2018-02-24 02:36
Messages (6)
msg312606 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2018-02-23 00:56
Change 'str' to 'code' in pyparse and code that uses it.  'str' conflicts with the built-in name and it too general for 'the block of python code being processed'.  'code' is what the string is.  The change applies to local 'str', 'self.str' references, and the 'set_str' method.  The latter requires renames in other modules.  From grep:F:\dev\3x\lib\idlelib\editor.py: 1305: y.set_str(rawtext)F:\dev\3x\lib\idlelib\editor.py: 1319: y.set_str(rawtext)F:\dev\3x\lib\idlelib\hyperparser.py: 47:  parser.set_str(text.get(startatindex, stopatindex)+' \n')F:\dev\3x\lib\idlelib\hyperparser.py: 63:  parser.set_str(text.get(startatindex, stopatindex)+' \n')editor imports pyparse and calls Parser once in   y = pyparse.Parser...and never references y.strhyperparser imports pyparse and calls Parser once in  parser = pyparse.Parser...and does reference the modifies parser.str once in line 67  self.rawtext = parser.str[:-2]set_str is not called within pyparse itselfThe existing pyparse tests are sufficient for pyparse since they execute every line containig 'str'.  The hyperparser test covers the above lines in Hyperparser.__init__, but test_editor covers almost nothing and would miss the editor lines.The two files access various methods and the editor code, the C_ constants, so I am not inclined to change names that are not so actively obnoxious.Since this will impact other pyparse changes, I think it should be next. Cheryl, respond here if you want to do the PR.
msg312623 -(view)Author: Cheryl Sabella (cheryl.sabella)*(Python committer)Date: 2018-02-23 09:44
Yes, I agree.  I'll start working on this one first.
msg312691 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2018-02-24 02:35
New changesetc29c03a34a9f3c82704b66f323ce5ea9dc89c8af by Terry Jan Reedy (Cheryl Sabella) in branch 'master':bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)https://github.com/python/cpython/commit/c29c03a34a9f3c82704b66f323ce5ea9dc89c8af
msg312694 -(view)Author: miss-islington (miss-islington)Date: 2018-02-24 02:59
New changesetf409c9988e72eff7c0378ab5578f5edecb8b1855 by Miss Islington (bot) in branch '3.7':bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)https://github.com/python/cpython/commit/f409c9988e72eff7c0378ab5578f5edecb8b1855
msg312695 -(view)Author: miss-islington (miss-islington)Date: 2018-02-24 03:16
New changesetcd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4 by Miss Islington (bot) in branch '3.6':bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)https://github.com/python/cpython/commit/cd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4
msg312699 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2018-02-24 05:21
Thanks.  It is nice splitting the work this way.
History
DateUserActionArgs
2022-04-11 14:58:58adminsetgithub: 77097
2018-02-24 05:21:23terry.reedysetstatus: open -> closed
type: enhancement
messages: +msg312699

resolution: fixed
stage: patch review -> resolved
2018-02-24 03:16:02miss-islingtonsetmessages: +msg312695
2018-02-24 02:59:56miss-islingtonsetnosy: +miss-islington
messages: +msg312694
2018-02-24 02:36:48miss-islingtonsetpull_requests: +pull_request5620
2018-02-24 02:35:49miss-islingtonsetpull_requests: +pull_request5619
2018-02-24 02:35:29terry.reedysetmessages: +msg312691
2018-02-23 12:36:55cheryl.sabellasetkeywords: +patch
stage: needs patch -> patch review
pull_requests: +pull_request5608
2018-02-23 09:44:01cheryl.sabellasetmessages: +msg312623
2018-02-23 00:59:58terry.reedylinkissue32880 dependencies
2018-02-23 00:56:01terry.reedycreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp