title: Insert a custom object in a sorted list
body: <p>I implemented an object with a numerical attribute. I want to keep a list of those objects sorted according to that attribute, without need to run a sort method at each insertion. I took a look to bisect module, but I do not know if I can use it also with an object.
  What is the best way to do that?</p>