8000 Docs: Add explanation about little/big endian by Granjow · Pull Request #109841 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Docs: Add explanation about little/big endian #109841

8000
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

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

Granjow
Copy link
Contributor
@Granjow Granjow commented Sep 25, 2023

Aims to help users like me which always have to look up which way round endianness now works.


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

< 8000 div class="commit-build-statuses">
@ghost
Copy link
ghost commented Sep 25, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Sep 25, 2023
Copy link
Member
@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could maybe write the byte pairs as Python byte strings. But that has cons. Also consider extracting this note into an admonition like tip or hint or info.

A

Comment on lines 163 to 166
The number ``1023``, or ``0x3ff`` in hex, is represented as follows in bytes:

* ``0x03 0xff`` in big-endian (``>``)
* ``0xff 0x03`` in little-endian (``<``)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could make this a .. tip or hint?

@AA-Turner AA-Turner added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 25, 2023
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Copy link
Contributor Author
@Granjow Granjow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this MR drowned in my email inbox. Better now? @AA-Turner

Copy link
Contributor
@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! It looks like the doctest is failing, maybe add the import?

Copy link
Member
@kushaldas kushaldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is good now.

@hauntsaninja hauntsaninja merged commit 177b9cb into python:main Feb 19, 2024
@miss-islington-app
Copy link

Thanks @Granjow for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 19, 2024
(cherry picked from commit 177b9cb)

Co-authored-by: Simon A. Eugster <simon.eu@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@bedevere-app
Copy link
bedevere-app bot commented Feb 19, 2024

GH-115646 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 19, 2024
(cherry picked from commit 177b9cb)

Co-authored-by: Simon A. Eugster <simon.eu@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Feb 19, 2024
@bedevere-app
Copy link
bedevere-app bot commented Feb 19, 2024

GH-115647 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Feb 19, 2024
hauntsaninja added a commit that referenced this pull request Feb 19, 2024
…5646)

Docs: Add explanation about little/big endian (GH-109841)
(cherry picked from commit 177b9cb)

Co-authored-by: Simon A. Eugster <simon.eu@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
hauntsaninja added a commit that referenced this pull request Feb 19, 2024
…5647)

Docs: Add explanation about little/big endian (GH-109841)
(cherry picked from commit 177b9cb)

Co-authored-by: Simon A. Eugster <simon.eu@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
@Granjow
Copy link
Contributor Author
Granjow commented Feb 19, 2024

Wow, that went fast now, thanks a lot!

woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0