Skip to content

bpo-26680: Incorporate is_integer in all built-in and standard library numeric types#6121

Merged
mdickinson merged 10 commits intopython:masterfrom
rob-smallshire:is_integer
Oct 1, 2020
Merged

bpo-26680: Incorporate is_integer in all built-in and standard library numeric types#6121
mdickinson merged 10 commits intopython:masterfrom
rob-smallshire:is_integer

Conversation

@rob-smallshire
Copy link
Contributor

@rob-smallshire rob-smallshire commented Mar 15, 2018

This change implements support for the x.is_integer() predicate across all built-in and standard library concrete numeric types: int, bool, Fraction and Decimal; previously it was supported only on float. It also incorporates is_integer() into the abstract types Real, Rational and Integral, with appropriate default implementations at each level.

Updates to the relevant documentation and test suites are included.

https://bugs.python.org/issue26680

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants