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

False negative for modified-iterating-list when using the del keyword #6648

Closed
Pierre-Sassoulas opened this issue May 19, 2022 · 0 comments · Fixed by #6652
Closed

False negative for modified-iterating-list when using the del keyword #6648

Pierre-Sassoulas opened this issue May 19, 2022 · 0 comments · Fixed by #6652
Labels
False Negative 🦋 No message is emitted but something is wrong with the code
Milestone

Comments

@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented May 19, 2022

Bug description

letters=['a','b','c','d','e','f','g','h','i','j','k','l']
for i in letters:
    del i
print(letters)  # Prints ['b', 'd', 'f', 'h', 'j', 'l']

Command used

pylint a.py

Pylint output

Nothing.

Expected behavior

modified-iterating-list raised. See #2471 (comment)

Pylint version

2.14.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative 🦋 No message is emitted but something is wrong with the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants