Shadowing built in names

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start at conversion_data/interface/Collection.py line 69 and inspect the method parameter named list and its uses. Rename the shadowing parameter to a clearer non-built-in name, update its references, and verify that the method's behavior remains unchanged.

Written by the indexing model from the issue text.

Description

For example:
https://github.com/DoReCo/multitool/blob/6791f54616f7f1df2b7349b05c93275c678e857a/conversion_data/interface/Collection.py#L69

In the Python language list is a built in name that will create a list data type. When you create a method that has list as a parameter name the semantics of using list inside that method changes from the default and thereby makes it harder for other people to understand what that code does. Using a different variable name would likely be a better option.

Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DoReCo/multitool

All issues in DoReCo/multitool

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.