sequence multiplied by -1

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sat Oct 2 21:28:22 EDT 2010


On Sat, 02 Oct 2010 14:12:39 -0700, Dennis Lee Bieber wrote:

> 	I'd prefer to see it used for floating point comparison in the two
> character:
> 			x ~= y
> though one might need to set up some system parameter to define what the
> permissible delta would be...
> 
> sys.floatDelta = 1.0E-6
> 
> or something...


It's not an operator, but you might like to play around with this recipe 
I published:

http://code.activestate.com/recipes/577124-approximately-equal/

Feedback is welcome.



-- 
Steven



More information about the Python-list mailing list