-
-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edge case when parsing complex numbers #105027
Comments
Note that the CPython3 behavior almost makes sense: the expression It only "almost" makes sense, because the detail that confuses matter is that the result of the expression |
Yes, the Python 3 behaviour, and the change w.r.t. Python 2, is intentional.
@arigo: In |
@arigo: Ah, sorry; I think I'm just repeating what you already said. Yes indeed, For some history on the Python 2 to Python 3 change, see #53257. For issues related to @arigo's comments, see #70026, #61538, #66738 (almost certainly an incomplete list). |
Also FTR: #84450, and @serhiy-storchaka's PR #19593. |
Bug report
A clear and concise description of what the bug is.
Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.
Parsing
-1.0j
with no real part will assume the real part is-0
, not +0. This is a change from Python2. Is it intentional? PyPy3 will assume+0
. This is the root cause of this PyPy issueYour environment
Debian-provided python3 all do this (python3.9, python3.10, python3.11).
Debian, CPython 3.9, 3.10, 3.11
The text was updated successfully, but these errors were encountered: