On Wed, Oct 17, 2007, Steven Bethard wrote:
>
> I'm having troubles coming up with things where the *basic* operator
> is really a cmp-like function.  Even in your example, the cmp function
> was defined in terms of "less than". If the basic operator is really
> "less than", then why define a cmp() function at all? 

>From my perspective, the real use case for cmp() is when you want to do
a three-way comparison of a "large" object (for example, a Decimal
instance).  You can store the result of cmp() and then do a separate
three-way branch.
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

The best way to get information on Usenet is not to ask a question, but
to post the wrong information.
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to