[issue41935] Add binary operator!

2020-10-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: You can already do: my_counter = 0 for i in rage(1000): my_counter += (1 if (i % 2) == 0 else 0) -- nosy: +pablogsal ___ Python tracker

[issue41935] Add binary operator!

2020-10-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In any case, for modifications about the Python syntax, please, open first some debate in the python-ideas mailing list. -- resolution: -> postponed stage: -> resolved status: open -> closed ___ Python

[issue41935] Add binary operator!

2020-10-04 Thread Hadi Alqattan
New submission from Hadi Alqattan : What are your opinions about adding a binary operator to Python in order to make this code possible? ``` my_counter = 0 for i in rage(1000): my_counter += 1 if (i % 2) == 0 ``` -- components: Interpreter Core messages: 377976 nosy: hadialqattan