[Python-ideas] Way to repeat other than "for _ in range(x)"

Markus Meskanen markusmeskanen at gmail.com
Thu Mar 30 05:57:12 EDT 2017


On Mar 30, 2017 12:53, "Nick Coghlan" <ncoghlan at gmail.com> wrote:

Because it's relatively rare to not use the loop variable for anything
(even if it's just a debug message), and in the cases where you
genuinely don't use it, a standard idiom can be applied (using a
single or double underscore as a dummy variable), rather than all
future users of the language needing to learn a special case syntax.

Cheers,
Nick.




I
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170330/0bae1fe9/attachment.html>


More information about the Python-ideas mailing list