-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add guideline for ignored values #17
Conversation
|
||
```Python | ||
for _ in range(10): | ||
do_something() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you say that i
is permissible for an unused iterator? This example might imply to people that it's not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for pylint rules, I guess? Seems like a sensible recommendation, though I think I might add a few words on why. Something like "In order to make clear to the reader that a variable is not used...", or even just "for readability".
By convention, In the guideline, I say: "The variable name |
I think an explanation would probably be good for why this guideline exists, yes. I think that using "junk" where a returned value is unused makes sense, yes (example 2). I'm not sure I agree on the iterators (example 1), though. |
@JustinCappos Are you okay with allowing |
For iterators, i, j, and k are fine by me.
I would prefer 'junk' is used if the iterator is unused though.
…On Mon, Nov 27, 2017 at 5:06 PM, Vladimir Diaz ***@***.***> wrote:
@JustinCappos <https://github.com/justincappos> Are you okay with
allowing i, j, or k for iterators?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA0XDwY9vcmI5ljZyICJc1nHaIlW7w_zks5s6zKAgaJpZM4QsVPl>
.
|
Okay, I added more examples and an explanation. Let me know if anything else is needed. |
👍 LGTM |
No description provided.