how to convert code that uses cmp to python3

Marko Rauhamaa marko at pacujo.net
Fri Apr 8 12:33:22 EDT 2016


Ian Kelly <ian.g.kelly at gmail.com>:
> That's fine for those operations and probably insert, but how do you
> search an AVL tree for a specific key without also using __eq__?

Not needed:
========================================================================
if key < node.key:
 look_right()
elif node.key < key:
 look_left()
else:
 found_it()
========================================================================
Marko


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /