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

Raise InvalidRangeError #13

Open
BrianHicks opened this issue Nov 25, 2012 · 1 comment
Open

Raise InvalidRangeError #13

BrianHicks opened this issue Nov 25, 2012 · 1 comment
Milestone

Comments

@BrianHicks
Copy link
Owner

Creating an invalid range should probably result in an InvalidRangeError or something similar. This would remove the need for is_valid and be more pythonic.

I'm just concerned it may violate the principle of least surprise.

@ghost ghost assigned BrianHicks Nov 25, 2012
@BrianHicks
Copy link
Owner Author

A consideration: would it ever be useful to create an invalid range?

  • steps would return an empty list
  • add could possibly work, but have no effect. It could also produce an invalid range
  • contains would always be False

@BrianHicks BrianHicks removed their assignment Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant