This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Better for loop
Type: enhancement Stage: resolved
Components: Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, me
Priority: normal Keywords:

Created on 2022-01-26 13:34 by grhetc4jiomtgrh7, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg411748 - (view) Author: Me (grhetc4jiomtgrh7) Date: 2022-01-26 13:34
for i in range(number), question in questions:
    ...

instead of

 for i, question in zip(range(number), questions):
    ...
msg411749 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2022-01-26 14:05
Thank you for the suggestion.

This is unlikely to gain acceptance. zip is usable in places outside of for loops, whereas your suggestion appears to be only useful in for loops. In addition, I don't see a way to specify the "strict" option using your syntax. Your syntax also doesn't seem to add any new functionality or expressiveness to python, which is one of the usual criteria for adding new syntax.

I'm going to close this, but if you'd like to pursue it, I suggest opening a discussion on the python-ideas mailing list.
History
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90694
2022-01-26 14:05:14eric.smithsetstatus: open -> closed

nosy: + eric.smith
messages: + msg411749

resolution: not a bug -> rejected
stage: resolved
2022-01-26 13:39:27grhetc4jiomtgrh7setnosy: + me, - grhetc4jiomtgrh7
resolution: not a bug
2022-01-26 13:34:27grhetc4jiomtgrh7create