On 9/25/07, Mark Summerfield <[EMAIL PROTECTED]> wrote:
>
>     Since the sorteddict's data is always kept in key order, indexes
>     (integer offsets) into the sorteddict make sense.  Five additional
>     methods are proposed to take advantage of this:
>
>     key(index : int) -> value
>
>     item(index : int) -> (key, value)
>
>     value(index : int) -> key
>
>     set_value(index : int, value)
>
>     delete(index : int)

But what about using non-sequential integer keys (something I do quite often)?

e.g. sorteddict({1:'a', 3:'b': 5:'c', 99:'d'})[3]  should return 'b', not 'd'.

Andrew
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to