On Thu, Jan 26, 2023 at 08:34:04PM +0100, Thomas Ratzke wrote:
> Hi all,
>
> i would like to suggest the following Python feature. It naturally
> happens that one want's to repeat the current iteration of a for loop
> for example after an error happened.
Can you give an example of when you
I don't think 'repeat' should make it into the language.
But: it's an excellent test case to check how flexible the language already
is. Joao did a great job demonstrating what's possible!
On Thu, 26 Jan 2023, 21:15 Joao S. O. Bueno, wrote:
> I don't think this will fly - if not for any other
Why would "if not A" also be true when you repeat the current iteration? What
keeps this from becoming an endless loop?
Jan 26, 2023, 11:45 by thomasratzk...@outlook.de:
> Hi all,
>
> i would like to suggest the following Python feature. It naturally happens
> that one want's to repeat the
On Fri, 27 Jan 2023 at 06:42, Thomas Ratzke wrote:
>
> Hi all,
>
> i would like to suggest the following Python feature. It naturally
> happens that one want's to repeat the current iteration of a for loop
> for example after an error happened. For this purpose, I usually set a
> flag and put a
I don't think this will fly - if not for any other reason, it is a very
rare pattern
to take place alongside such important flow-control statements as
continue and break
But for your convenience, here is a small wrapper that, along with the
walrus operator, could be used when you need that