Skip to content

Unfortunate type bound on Range #10414

@emberian

Description

@emberian

Range has a type bound on ToPrimitive so that it can have a size_hint. It does not need this to function, and the size_hint is just an optional nicety.

It'd be nice if there were some way to express this with the type system; this "optional" type bound makes the interface less generic (though it's not that big of a deal).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-trait-systemArea: Trait systemE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions