Skip to content

IDLE: Stop reusing built-in names as parameters #96905

Description

@terryjreedy

Some idlelib functions use built-in names such as 'object', 'dict', and 'type' as function parameter names. As a result, these parameter names are mistakenly highlighted as builtin names. Unless a parameter name is used as a keyword in any call of the function, changing a parameter name within a function should cause no problems.

The easiest name change is to append '_'. That is what I have done so far to get 'object_' and 'dict_' in my b_ins branch.
EDIT: In appropriate places, I prefixed 'g' or 'l', for 'global or 'local', to 'dict'.

Dependency of #87179

Linked PRs

Activity

  1. self-assigned this
    on Sep 18, 2022
  2. changed the title [-]IDLE: Stop reusing built-in names[/-] [+]IDLE: Stop reusing built-in names as parameters[/+] on Apr 21, 2023
  3. added 2 commits that reference this issue on Jan 18, 2024
  4. added 2 commits that reference this issue on Jan 18, 2024
  5. added a commit that references this issue on Jan 18, 2024
  6. terryjreedy commented on Jan 18, 2024

    @terryjreedy
    MemberAuthor

    I am deferring replacements of 'type' to another issue (currently draft). It has at least as many hits as 'dict' and 'object' combined, and many are argument names in non-idlelib modules. Am closing this and the linked master issue.

  7. added a commit that references this issue on Jan 18, 2024
  8. added a commit that references this issue on Jan 22, 2024
  9. added a commit that references this issue on Feb 11, 2024
  10. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions