The goal is to make a namedtuple subclass with helper functions (which obviously are read-only, because it's a namedtuple). Simply creating a namedtuple and subclassing it doesn't work, as the subclass gets __dict__ and other mutable things that ruin the __slots__ awesomeness of namedtuple. So instead, this uses ActuallyCalls (from actually.py, https://gist.github.com/dplepage/5095902) to create a new namedtuple class and add your functions to it.
- Obvious caveats:
- If you subclass one of these classes, you'll have the same problem as with subclassing namedtuple directly
- Don't specify methods like __new__ that will conflict with namedtuple's members