On Mon, 15 Mar 2010 16:34:35 -0700, JLundell wrote: > It's also unfortunate that Python doesn't have an approximately-equal > operator; it'd come in handy for floating-point applications while > preserving hash. If only there were a ~= or ≈ operator I could overload. > And ~ is unary, so no joy.
Not everything needs to be a built-in, or an operator. This might be useful for you: http://code.activestate.com/recipes/577124-approximately-equal/ Feedback welcome. -- Steven -- http://mail.python.org/mailman/listinfo/python-list