Breaking/continuing out of multiple loops

Yes, the context is VERY important, and the fact that made-up context is all you can offer is, itself, telling.

I mentioned earlier that I had found just two examples where I’d used multi-level break/continue, across all my code. Here they both are:

In the middle of a mess of organic growth (honestly, if I were still adding to that code, I’d probably end up refactoring it somewhere), one branch of a switch block needs to halt a loop. This isn’t what I’d call particularly good code, but even if it were, the Python equivalent wouldn’t use a switch statement, so there wouldn’t be two levels to break.

Quick and dirty script. The core double-loop here has an outer “wait for data from socket and fill buffer” loop and an inner “split buffer into lines” loop. Upon receipt of a quit command, it needs to break out of both. But this is only a nested loop with this specific design; it could just as easily be written as a single loop, with “if the buffer doesn’t match this pattern, fetch more from the socket and continue” (a regular single-level continue statement), or as a producer-consumer, or any number of other ways. I actually have no idea why I happened to write it like this, beyond that it worked, and the purpose of this was to test something else entirely and I wanted to focus my time on what actually mattered.

So even when the feature exists, it’s not something people use all that frequently. (In contrast, continue, which is used far less frequently than break, shows up hundreds of times in my shed repository alone.) To better explain why you think this is useful, we really need a good example.