"Antoon Pardon" <[EMAIL PROTECTED]> wrote:
> Comments are welcome:
>
> http://www.pardon-sleeuwaegen.be/antoon/avltree.html
How about adding two shortcut methods, nextkey(k) and prevkey(k), to return the
next and previous
key respectively ? For instance nextkey would be equivalent to (untested):
def nextkey(self, key):
iter = self[key:]
first = iter.next()
if key not in self: return first
else: return iter.next()
Also for consistency, nextvalue(k), prevvalue(k), nextitem(k), previtem(k)
would be reasonable
additions.
And a question: what does step do if the keys are not integers since you
restrict step to be integer
?
George
--
http://mail.python.org/mailman/listinfo/python-list