[Python-ideas] Re: while(tt--)

2023-08-19 Thread Celelibi
2023-08-04 8:18 UTC+02:00, daniil.arashkev...@gmail.com : > Currently in Python we have construction like this: > > tt = 5 > while t: > # do something > tt -= 1 > > It would be great if in Python we have something like this: > tt = 5 > while (tt--): > # do something > > It is exists in

[Python-ideas] Re: while(tt--)

2023-08-19 Thread Chris Angelico
On Sun, 20 Aug 2023 at 09:28, Celelibi wrote: > Just as a reminder of C/C++: {pre,post}-{inc,dec}rementations bring > their lot of issues with the language. Mostly the infamous *undefined > behavors*. If you've done some C or C++ this very expression might > send shivers down your spine. The ONLY