cpython
cpython copied to clipboard
`csv` assumes that there are builds without `complex`
These lines assume that there might be NameError in some cases while accessing complex:
https://github.com/python/cpython/blob/0124b5dd28eff7bb80eb7244e97e402a036db13b/Lib/csv.py#L168-L172
I don't think that it is true today (the code itself is 20 years old).
Now complex is a documented part of the builtins. If it is missing, half of the stdlib will be broken.
I've sent the PR with the removal of these lines.
- PR: gh-99282