Mark Summerfield <[EMAIL PROTECTED]> writes: > The sorteddict API that has emerged so far is (1) apart from the > constructor, everything is identical to dict,
I don't see this as necessary, it's ok if it resembles dict as much as dbm does. > (2) the constructor takes the same args as sorted(), so if you want > to seed with a dict or with keywords you write > sorteddict(dict(a=1,b=2), ...), (or you could create a sorteddict > and use update() since that takes the same args as dict's > constructor). sorteddict could itself return a constructor: d = sorteddict(key=int).new((('12', 'a'), ('3', 'b'))) gives sorted version of {'3':'b', '12':'a'} -- http://mail.python.org/mailman/listinfo/python-list