title: Python equivalent to java.util.SortedSet?
body: <p>Does anybody know if Python has an equivalent to Java's SortedSet interface?</p>
  <p>Heres what I'm looking for: lets say I have an object of type <code>foo</code>, and I know how to compare two objects of type <code>foo</code> to see whether <code>foo1</code> is &quot;greater than&quot; or &quot;less than&quot; <code>foo2</code>. I want a way of storing many objects of type <code>foo</code> in a list <code>L</code>, so that whenever I traverse the list <code>L</code>, I get the objects in order, according to the comparison method I define.</p>
  <h3>Edit:</h3>
  <p>I guess I can use a dictionary or a list and <code>sort()</code> it every time I modify it, but is this the best way?</p>