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.

Author steven.daprano
Recipients DarrenDanielDay, steven.daprano
Date 2020-07-27.10:54:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595847275.38.0.569178572853.issue41407@roundup.psfhosted.org>
In-reply-to
Content
Converting *all* exceptions into RuntimeError is certainly not a good idea, especially since you include KeyboardInterrupt and other non-errors.

I'm probably going to be on the losing side of this one (I lost the argument back when a similar issue was raised about comprehensions), but I argue that this is not a bug it is a useful feature.

Having the map function raise StopIteration is a good way for the map to halt the loop early, when it detects a special sentinel or condition. A few years ago the change to comprehensions broke my code so I changed to map, and now you want to break it again :-(
History
Date User Action Args
2020-07-27 10:54:35steven.dapranosetrecipients: + steven.daprano, DarrenDanielDay
2020-07-27 10:54:35steven.dapranosetmessageid: <1595847275.38.0.569178572853.issue41407@roundup.psfhosted.org>
2020-07-27 10:54:35steven.dapranolinkissue41407 messages
2020-07-27 10:54:35steven.dapranocreate