Skip to content

Conversation

@darshan2456
Copy link

@darshan2456 darshan2456 commented Jan 15, 2026

This PR documents the existing convention for representing complex numbers
using scalar floating-point format characters in the struct module.

Specifically, it clarifies that complex numbers may be represented as two
consecutive floating-point values (real part followed by imaginary part),
with the f and d format characters determining the component type.

The clarification is applied consistently to both the runtime docstring
and the library documentation.


📚 Documentation preview 📚: https://cpython-previews--143879.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Jan 15, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Jan 15, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@darshan2456
Copy link
Author

This is a documentation-only change; no NEWS entry is needed. Could a triager please add the skip news label?

@skirpichev skirpichev self-requested a review January 15, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant