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

Multiplication of list containing mutable elements #12115

Closed
hauntsaninja opened this issue Jun 30, 2024 · 1 comment
Closed

Multiplication of list containing mutable elements #12115

hauntsaninja opened this issue Jun 30, 2024 · 1 comment
Labels
rule Implementing or modifying a lint rule

Comments

@hauntsaninja
Copy link
Contributor

hauntsaninja commented Jun 30, 2024

This would catch bugs like:

shards = [[]] * 10
for obj in objects:
    shards[hash(obj) % 10].append(obj)
@dhruvmanila dhruvmanila added the rule Implementing or modifying a lint rule label Jul 1, 2024
@InSyncWithFoo
Copy link
Contributor

Seems to be a duplicate of #10505.

@MichaReiser MichaReiser closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

No branches or pull requests

4 participants