Skip to content

math.isnan and math.isinf should allow Decimal type #1975

@brycepg

Description

@brycepg

The isinf and isnan can process decimal types:

import math
from decimal import Decimal
math.isnan(Decimal("nan"))

evaluates to True

Also isinf and isnan do no error out when passed int types. (Just always return false) Should that mean the stub should allow int to be passed as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions