]> granicus.if.org Git - python/commit
Use rich comparisons to fulfill an old wish: complex numbers now raise
authorGuido van Rossum <guido@python.org>
Thu, 18 Jan 2001 01:12:39 +0000 (01:12 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 18 Jan 2001 01:12:39 +0000 (01:12 +0000)
commitbe4cbb16681ba9274b3017d9ccf3bcb2a2dbc30c
tree387428f57c5410d5014c2f09d8487052d181fff2
parent9d19cb8a70544ced7ec9a7995a31d1ed708d4841
Use rich comparisons to fulfill an old wish: complex numbers now raise
exceptions when compared using <, <=, > or >=.

NOTE: This is a tentative change: this means that cmp() involving
complex numbers will raise an exception when the numbers differ, and
that in turn means that e.g. dictionaries and certain other compounds
(e.g. UserLists) containing complex numbers can't be compared either.
So we'll have to decide whether this is acceptable.  The alpha test
cycle is a good time to keep an eye on this!
Objects/complexobject.c