Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add __str__ method to Interval object #379

Open
alaniwi opened this issue Apr 26, 2023 · 0 comments
Open

add __str__ method to Interval object #379

alaniwi opened this issue Apr 26, 2023 · 0 comments

Comments

@alaniwi
Copy link

alaniwi commented Apr 26, 2023

Would be useful to get some info about contents of an Interval object when printed.

class Interval:
"""
A simple class for handling an interval of any type.
It holds a `start` and `end` but does not try to resolve
the range, it is just a container to be used by other tools.
The contents can be of any type, such as datetimes, strings etc.
"""
def __init__(self, *data):
self.value = parse_range(data, self.__class__.__name__)

@Zeitsperre Zeitsperre transferred this issue from roocs/roocs-utils Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant