gh-121249: Support _Complex types in the struct module#121613
gh-121249: Support _Complex types in the struct module#121613vstinner merged 12 commits intopython:mainfrom
Conversation
ZeroIntensity
left a comment
There was a problem hiding this comment.
Nice PR! This looks like something that would have had to get approved on Discourse, though.
Misc/NEWS.d/next/Library/2024-07-10-08-13-34.gh-issue-121249.W9Gd09.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2024-07-10-08-13-34.gh-issue-121249.W9Gd09.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This is why things get discussed on discourse first 😉 |
ZeroIntensity
left a comment
There was a problem hiding this comment.
This implementation LGTM.
Although, for core dev review, I'm not too sure about this behavior: if the compiler does not support C11 complex types, then the new format characters are disabled and raise an error with no further information.
I'm worried that this will lead to some bug reports later on wondering why E and C don't work on their system -- it would be ideal to raise a different error mentioning that the system doesn't support C11 (albeit, it would be more work to implement).
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7806d52 to
fec6be6
Compare
|
Now on systems without _Complex type - a different error will be raised. |
picnixz
left a comment
There was a problem hiding this comment.
On my side it's fine. I didn't check in details the functions bodies, but I assume that the tests should cover most of the cases. I think it remains to wait for Victor's and/or Serhiy's review.
Co-authored-by: Victor Stinner <vstinner@python.org>
|
Merged, thanks. |
📚 Documentation preview 📚: https://cpython-previews--121613.org.readthedocs.build/