A question came up on StackOverflow about range objects and floating point numbers. I thought about writing an frange that did for floats what range does for ints, so started examining the range class. I noticed it has __le__, __lt__, __eq__, __ne__, __ge__, and __gt__ methods. Some experiments show that xrange in 2.x does indeed implement those operations, but in 3.x range does not (TypeError: unorderable types: range() > range()).

Was this intentional, or should I file a bug report? (I was unable to find anything in the What's New documents; also, I did not test in 3.0, just in 2.7, 3.1, 3.2.)

~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to