Currently it's very difficult to tell if a user accidentally passed in strings to pyinterval.closedopen. For instance, in the case of:
bad_interval = pyinterval.closedopen('100','200')
The repr() and str() modules don't show the quotes around the values, so it looks like you passed in integers. The only way to tell is by using
bad_interval._data._lower_value
bad_interval._data._upper_value
I understand you want the module to be type-agnostic, which is admirable, but making repr() look like:
instead of:
might make it easier to debug problems.
Currently it's very difficult to tell if a user accidentally passed in strings to
pyinterval.closedopen. For instance, in the case of:The repr() and str() modules don't show the quotes around the values, so it looks like you passed in integers. The only way to tell is by using
I understand you want the module to be type-agnostic, which is admirable, but making repr() look like:
instead of:
might make it easier to debug problems.