-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Emit consider-using-tuple for in comparisons #4853
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
Conversation
Pull Request Test Coverage Report for Build 1152322179
💛 - Coveralls |
I thought the point of #4776 was to replace that by |
The reason I opened this one is that IMO we just shouldn't move forward with If we don't recommend sets, there is still some value in using tuples instead. As the docstring for the checker mentions: even only for style consistency. |
I added more information in #4776 so the discussion can go on. |
a642e18
to
45e8f4f
Compare
928df1e
to
259bc71
Compare
259bc71
to
1b41bc1
Compare
Closing this one, since we are going to move forward with #4841 |
Type of Changes
Description
Alternative to #4841
In contrast to #4768, with this PR
consider-using-tuple
will only be emitted for lists inin
comparisons.As discussed in #4776, this change will not have any impact on performance. CPython does this optimization when converting to bytecode.