<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I hope that Python gets a sorteddict and a<br>sortedset. </blockquote></div><br>It doesn&#39;t make sense for Python to have sorteddict or
sortedset. You see, dict can have&nbsp; keys which cannot be
ordered (keys can be heterogeneous, in which case Py3K may raise TypeError; ordering doesn&#39;t make sense for the objects used as keys) and
same goes for set elements.<br>
<br>
Sorting makes sense only as a run-time operation, in which case, the programmer should be prepared to handle appropriate exceptions.<br clear="all"><br>Btw, would you like a dict or set for which you have to handle exceptions at every insertion?
<br><br>-- <br>Regards,<br>Arvind