Message374372
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 :-( |
|
Date |
User |
Action |
Args |
2020-07-27 10:54:35 | steven.daprano | set | recipients:
+ steven.daprano, DarrenDanielDay |
2020-07-27 10:54:35 | steven.daprano | set | messageid: <1595847275.38.0.569178572853.issue41407@roundup.psfhosted.org> |
2020-07-27 10:54:35 | steven.daprano | link | issue41407 messages |
2020-07-27 10:54:35 | steven.daprano | create | |
|