Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Consider implementing custom __eq__ for indices classes #117

Open
@pipermerriam

Description

@pipermerriam

NOTE: it isn't clear whether there is much benefit to be gained from this approach but worth considering for added safety.

We use custom integer subclasses for the various indices types. A naive comparison of 1 == LocalIdx(1) will currently return True.

If we want to be extra strict we should consider implementing __eq__ methods on these to differentiate them from 1) each other and 2) base int values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions