Skip to content
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

Unsuitable variable name "list" as the input #7

Open
zxdawn opened this issue Nov 26, 2020 · 0 comments · May be fixed by #9
Open

Unsuitable variable name "list" as the input #7

zxdawn opened this issue Nov 26, 2020 · 0 comments · May be fixed by #9

Comments

@zxdawn
Copy link

zxdawn commented Nov 26, 2020

def _get_species(self, list):

I guess you use some package to convert the py2 script into py3.
As you can see, it uses list(map ...) to convert the results into list, you have to rename the list passd in, like this:

    def _get_species(self, species_list):
        items = species_list.curselection()
        try: items = list(map(int, items))
        except: pass
        items = list(map(lambda i, d = self.species_objects: d[i], items))
        return items

Otherwise, list(map ...) will use the Listbox which is species_list in my revision.

@zxdawn zxdawn linked a pull request Nov 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant