#The following Python code:

class X:
  def __cmp__(self, y):
    print "cmp", self, y
    return cmp(self, y)

x = X()
print x < 10

# gives interesting results under different Python version.
The most common sense in the result in Python 2.4: recursion
limit reached.

Python 2.3 tries 20+ times and then give up.

Python1.5 gives segmentation fault...


Sincerely yours, Roman Suzi -- [EMAIL PROTECTED] =\= My AI powered by GNU/Linux RedHat 7.3 -- http://mail.python.org/mailman/listinfo/python-list

Reply via email to