Fix misleading statement about mixed-type numeric comparisons (GH-18615) (#18773)

(cherry picked from commit 9f1cb1bb49)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-03-04 03:52:56 -08:00 committed by GitHub
parent 57fb29219f
commit 6c8cc0dbfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -261,8 +261,10 @@ and imaginary parts.
Python fully supports mixed arithmetic: when a binary arithmetic operator has
operands of different numeric types, the operand with the "narrower" type is
widened to that of the other, where integer is narrower than floating point,
which is narrower than complex. Comparisons between numbers of mixed type use
the same rule. [2]_ The constructors :func:`int`, :func:`float`, and
which is narrower than complex. A comparison between numbers of different types
behaves as though the exact values of those numbers were being compared. [2]_
The constructors :func:`int`, :func:`float`, and
:func:`complex` can be used to produce numbers of a specific type.
All numeric types (except complex) support the following operations (for priorities of

View File

@ -0,0 +1 @@
Fix misleading documentation about mixed-type numeric comparisons.