KEMBAR78
gh-102823: Document return type of floor division on floats by mdickinson · Pull Request #102824 · python/cpython · GitHub
Skip to content

Conversation

@mdickinson
Copy link
Member

@mdickinson mdickinson commented Mar 19, 2023

This PR documents the long-standing behaviour that the floor division operator // applied to float operands returns a result of type float.

Also adds a missing note to the table to note that x // y isn't valid for complex numbers.

Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

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

Indeed, information about mixed arithmetic is given above.
LGTM

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thanks!

@hugovk hugovk enabled auto-merge (squash) September 7, 2023 14:13
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Sep 7, 2023
@hugovk hugovk merged commit b72251d into python:main Sep 7, 2023
@miss-islington
Copy link
Contributor

Thanks @mdickinson for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 7, 2023
…thonGH-102824)

(cherry picked from commit b72251d)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Sep 7, 2023
@bedevere-bot
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 7, 2023
…thonGH-102824)

(cherry picked from commit b72251d)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 7, 2023
hugovk added a commit that referenced this pull request Sep 7, 2023
…H-102824) (#109093)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Yhg1s pushed a commit that referenced this pull request Sep 8, 2023
…H-102824) (#109092)

gh-102823: Document return type of floor division on floats (GH-102824)
(cherry picked from commit b72251d)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants