Message416560
This sort of thing would be better caught by a linter or type checker. For example, mypy with the `--warn-unreachable` option will flag the `while None:` example.
Iterating over an empty list will not currently be caught by mypy, but it's common in real code to iterate over a list that may be empty, so it would be a major compatibility break for Python to error when iterating over an empty list. |
|
Date |
User |
Action |
Args |
2022-04-02 15:35:22 | JelleZijlstra | set | recipients:
+ JelleZijlstra, lys.nikolaou, pablogsal, Luminair |
2022-04-02 15:35:22 | JelleZijlstra | set | messageid: <1648913722.92.0.493114323736.issue47202@roundup.psfhosted.org> |
2022-04-02 15:35:22 | JelleZijlstra | link | issue47202 messages |
2022-04-02 15:35:22 | JelleZijlstra | create | |
|