On Tue, 22 Aug 2023 at 05:34, Wes Turner wrote:
>
> On Sat, Aug 19, 2023, 7:27 PM Celelibi wrote:
>>
>> 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
>>
On Sat, Aug 19, 2023, 7:27 PM Celelibi wrote:
> 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
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
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
On 04/08/2023 14:02, Niktar Lirik via Python-ideas wrote:
Hi Daniil.
Yes, you can do almost same:
tt = 5
while tt := tt - 1:
print(tt)
"almost" is right. The OP's version, as far as I can tell, wants to do
post-decrement (test tt, then decrement it) so it would "do somethin
Hi Daniil.
Yes, you can do almost same:
tt = 5
while tt := tt - 1:
print(tt)
04.08.2023 9:18, 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 somet
I'm not sure if you are trolling, but why not use "range"? Can't get
more Pythonic than that.
--
*Powertools Technologies, Lda*
R. Alves Redol 9 * 1000-029 Lisboa * Portugal
Phone: +351 214 009 555 * GPS: 38°44'10.927"N 9°8'26.757"W
E-mail: cont...@powertools-tech.com * https://www.powertool