Booleans and comparison results

R

Roman Suzi

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?
Equal


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,367
Latest member
Monarch

Latest Threads

Top