467,875 Members | 1,380 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,875 developers. It's quick & easy.

Booleans and comparison results

Just a thought. Why cmp() returns -1,0,1 while comparison
results are False and True? Isn't it logical step to add
Less, Equal and More?
cmp(1,2) Less cmp(1,-1) More cmp(1,1)

if cmp(foo, bar) is Less:

hmmm... Sadly, I know GvR is not going to add new keyword:

if cmp(foo, bar) are Equal:


Sincerely yours, Roman Suzi
rn*@onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
Jul 18 '05 #1
  • viewed: 2071

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Gerrit Holl | last post: by
10 posts views Thread by chandra.somesh | last post: by
5 posts views Thread by Christopher Benson-Manica | last post: by
4 posts views Thread by Peter Kirk | last post: by
6 posts views Thread by chech | last post: by
26 posts views Thread by Pietro Cerutti | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.