[Python-3000] ordered dict for p3k collections? (original) (raw)
Arvind Singh arvind1.singh at gmail.com
Sat Sep 15 15:45:21 CEST 2007
- Previous message: [Python-3000] ordered dict for p3k collections?
- Next message: [Python-3000] ordered dict for p3k collections?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I hope that Python gets a sorteddict and a sortedset.
It doesn't make sense for Python to have sorteddict or sortedset. You see, dict can have keys which cannot be ordered (keys can be heterogeneous, in which case Py3K may raise TypeError; ordering doesn't make sense for the objects used as keys) and same goes for set elements.
Sorting makes sense only as a run-time operation, in which case, the programmer should be prepared to handle appropriate exceptions.
Btw, would you like a dict or set for which you have to handle exceptions at every insertion?
-- Regards, Arvind -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-3000/attachments/20070915/417eef1a/attachment.htm
- Previous message: [Python-3000] ordered dict for p3k collections?
- Next message: [Python-3000] ordered dict for p3k collections?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]