Skip to content

Conversation

@terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Jan 26, 2025

Explain the alternative choices for int division (i // j) and modulo (i % j) sign determination.
Mention that some languages choose truncation and 'i' determination. Justify Python's choice of flooring and 'j' determination.


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

Explain the alternative choices for int division (//)
and modulo (i % j) sign determination.
Mention that some languages choose truncation and 'i' determination.
Justify Python's choice of flooring and 'j' determination.
@terryjreedy terryjreedy added docs Documentation in the Doc dir skip news needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Jan 26, 2025
@terryjreedy terryjreedy self-assigned this Jan 26, 2025
@encukou
Copy link
Member

encukou commented Jan 27, 2025

In the Reference section on // and %, there are a few footnotes with information of a similar nature. Did you consider linking from there to the FAQ entry?

@hugovk hugovk removed the needs backport to 3.12 only security fixes label Apr 10, 2025
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants