> Pylint also "allows" the name `dummy` without complaining. That makes it
> even clearer and doesn't clash with the meaning of `_` when `gettext` is
> used.
Thanks, that's even better!
Noam.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 4, 11:29 am, Bruno Desthuilliers wrote:
> A common idiom is to use '_' for unused values, ie:
>
> for (dirpath, _, filenames) in os.walk(...):
That's what I need - this avoids PyLint telling me that I have an
unused variable, and also makes it clear that this value is not used.
Thanks!
Hi,
Some functions, like os.walk(), return multiple items packed as a
tuple:
for (dirpath, dirnames, filenames) in os.walk(...):
Now, if you don't care about one of the tuple members, is there a
clean way to ignore it, in a way that no unused variable is being
created?
What I wanted is:
for (di