I think this is the kind of feature that can very easily be abused. Whenever I want to break out of a nested loop I take this as an opportunity to extract the loop into its own function and use the return statement to break out of the loop. IMO this is a lot better than having named or indexed loop control because a proper function can later be reusable, and it lets you explain why you need to return early in the docstring. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/SMU7CAFHWQROQYLWK3HEL5XDDRXKU46Z/ Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-ideas] Re: Make for/while loops nameable. Abdur-Rahmaan Janhangeer
- [Python-ideas] Re: Make for/while loops nameable. Paul Moore
- [Python-ideas] Re: Make for/while loops nameable. Mathew Elman
- [Python-ideas] Re: Make for/while loops nameable. M.-A. Lemburg
- [Python-ideas] Re: Make for/while loops nameable. Paul Sokolovsky
- [Python-ideas] Re: Make for/while loops name... Jonathan Fine
- [Python-ideas] Re: Make for/while loops ... Chris Angelico
- [Python-ideas] Re: Make for/while lo... Jonathan Fine
- [Python-ideas] Re: Make for/whil... Chris Angelico
- [Python-ideas] Re: Make for/while lo... Serhiy Storchaka
- [Python-ideas] Re: Make for/while loops nameable. Valentin Berlier
- [Python-ideas] Re: Make for/while loops nameable. Daniel Moisset
- [Python-ideas] Re: Make for/while loops name... Henk-Jaap Wagenaar
- [Python-ideas] Re: Make for/while loops name... Stephen J. Turnbull
- [Python-ideas] Re: Make for/while loops name... Ricky Teachey
- [Python-ideas] Re: Make for/while loops ... David Mertz
- [Python-ideas] Re: Make for/while lo... Ricky Teachey