Skip to content

int is not compatable with float #11145

Closed
@KotlinIsland

Description

@KotlinIsland

https://mypy.readthedocs.io/en/stable/duck_type_compatibility.html

int is duck type compatible with float

No it's not:

f: float = 1
f.is_integer()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions