class inheritance

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Wed Mar 17 20:12:14 EDT 2010


On 2010年3月15日 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


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /