-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users #77097
Comments
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) editor imports pyparse and calls Parser once in hyperparser imports pyparse and calls Parser once in set_str is not called within pyparse itself The 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. |
Yes, I agree. I'll start working on this one first. |
Thanks. It is nice splitting the work this way. |
str
tocode
in pyparse #5830str
tocode
in pyparse (GH-5830) #5844str
tocode
in pyparse (GH-5830) #5845Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: