-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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 new combination of keywords: "break and continue" inside a nested loop breaks the inner and continues in the outer #101935
Comments
Hmm, then why are you here? I just tried creating a feature request, and the template contained this:
If/when you do that, please fix the IndentationError, which currently makes your code invalid and unclear. And your example's |
This proposed API is awful. What if you want to break out of six loops? If you search for |
@pochmann, @stevendaprano, please take care of your tone. "Why are you here?" and "This proposed API is awful" are not constructive or welcoming comments. |
@r3dapple If this idea is something you want to pursue, a post to the Ideas section of discuss.python.org is the right way to get started. Note though that there have been discussions of very similar ideas in the past that have universally been shot down; a search for "nested loops" in the Ideas section or on the python-ideas mailing list archives might be instructive. |
@zware I did, and you misquoted me. |
I thought the same thing. Thank you. |
@zware the second line in the CoC states:
"Focusing on what is best for the community. We're respectful of the
processes set forth in the community, and we work within them."
The processes here **clearly and obviously** include that ideas for new
features be discussed elsewhere before creating an issue here. Do you
think that @r3dapple completely ignoring that process is respectful?
That process exists for a good reason: to limit the number of half-baked
ideas on the tracker, and help insulate the core devs from burn-out from
dealing with them.
The CoC also talks about being receptive to constructive criticism. That
goes both ways. @r3dapple why did you ignore the instructions? Perhaps
you would find the community less "toxic" if you were a little more
respectful towards the community.
Even if the functionality (being able to break out of multiple loops at
once) is desirable, the proposed interface suggested here is clunky,
difficult to use and read, and error-prone. In other words, awful. I do
not apologise for using that word. Criticism of the API is not criticism
of the person.
@zware you should know that quoting out of context is unfair, unkind and
dishonest. In context, @pochmann said nothing wrong. I think that you
owe him an apology.
|
@zware @stevendaprano To be clear, I didn't even mean the context of me then pointing out the template text with the information of what to do, and my suggestions of how to improve their code for a better example. What I meant is that I didn't say "Why are you here?". I said "Hmm, then why are you here?". To me, the former sounds possibly angry or even yelling. While the "Hmm" rather avoids that. You don't yell "Hmm". Instead, it's setting a calm wondering tone. Wondering whether they perhaps weren't shown that text that I then cited. Might depend on the device, who knows. I very deliberately included that "Hmm", precisely for the tone. Then to be told "take care of your tone", with that "Hmm" being removed and the "Why" capitalized to really give the impression that the "Hmm" wasn't there... that's not ok. |
if "awful" is not a constructive term, all of the "zen of python" must be removed. |
Feature or enhancement
Add new combination of keywords: "break and continue" inside a nested loop breaks the inner and continues in the outer.
This could be extended to "break and break" to break inner and outer loop or even to "break and continue and continue" to break in the most inner, continue in the second most inner and continue in the outer loop"
Pitch
We often have nested loops. Sometimes I want to continue or break the outer depending of a result of a function call in the inner. What I have to do is:
What I would like to do is:
Previous discussion
I have never heard of anyone discussing this.
The text was updated successfully, but these errors were encountered: