Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.python Subject: Re: how to convert code that uses cmp to python3 Date: Thu, 07 Apr 2016 12:26:11 -0700 Organization: A noiseless patient Spider Lines: 8 Message-ID: <87a8l5p6ek.fsf@nightsong.com> References: <57064D0D.1030701@rece.vub.ac.be> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="52eac348160ce62b68e4635eee7cc854"; logging-data="30277"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/SIWT4ioR9x+lIqT87JfKU" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:hkze3qgFNYWA18Z0hl76XhrV+iY= sha1:pPOAgmC9kXGE/yzG7LroNgf258A= Xref: csiph.com comp.lang.python:106635 Chris Angelico writes: > First off, what does it actually *mean* to have a tree with numbers > and keys as strings? Are they ever equal? Are all integers deemed > lower than all strings? Something else? If the AVL tree's purpose is to be an alternative lookup structure to Python's hash-based dictionaries, then it doesn't really matter what the ordering between values is, as long as it's deterministic.