Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Implement special method __contains__ for the NumberRange type #7

@victorgarcia98

Description

@victorgarcia98

It would be nice to implement the special method __contains__ in the NumberRange type to check if a given value is contained within the range, enabling the following:

>> a = NumberRange(start_of_range=0, end_of_range=1)
>> 0.5 in a
True
>> 10 in a
False

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions