By which I mean a structure with:
x.push()
import bisect class sortedlist(list): '''just a list but with an insort (insert into sorted position)''' def insort(self, x): bisect.insort(self, x)