>> How about creating two classes for this? One that supports zero sized >> intervals, and another that doesn't? > If you don't want zero sized intervals, just don't put any in it. You > don't have a separate list type to support even integers vs one that > supports all floats. What operations are made different in > implementation by this restriction? When you substract two sets, zero sized intervals may appear in the result. It is not just a question of "putting or not putting them in". Are zero sized intervals valid or not? In my particular application, they are not. I think Michael was right: this cannot be generalized. It is application dependent.
-- https://mail.python.org/mailman/listinfo/python-list