#!/usr/local/bin/python2 from collections import Mapping, Sequence class ListView(Sequence): __slots__ = ('_sequence') def __init__(self, target): self._target = target def __getitem__(self, index): return self._target[index] def __len__(self): return len(self._target) def __repr__(self): return '%s(%s)' % (type(self).__name__, self._target) class SortableView(ListView): __slots__ = () def sort(*args, **kwargs): args[0]._target.sort(*args[1:], **kwargs) v = SortableView([14,7,2,8,]) v.sort() print str(v)