Guest User

Untitled

a guest
Jul 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. class Interval(namedtuple('IntervalBase', ['begin', 'end', 'data'])):
  2. __slots__ = () # Saves memory, avoiding the need to create __dict__ for each interval
  3.  
  4. def __new__(cls, begin, end, data=None):
  5. return super(Interval, cls).__new__(cls, begin, end, data)
Add Comment
Please, Sign In to add comment