New submission from chienpingtsung <[email protected]>:
'for loop' always been used as follow code:
arr = [...]
for e in arr:
if not condition(e):
continue
...
What if be written just like 'list expression', would it be more explicit?
for e in arr if condition(e):
pass
----------
components: Interpreter Core
messages: 378015
nosy: chienpingtsung
priority: normal
severity: normal
status: open
title: Add if condition for 'for loop'
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41942>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com