On 11 October 2013 03:08, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > Your mistake here seems to be that you're assuming that if two numbers > are equal, they must be in the same domain, but that's not the case. > (Perhaps you think that 0.0 == 0+0j should return False?) It's certainly > not the case when it comes to types in Python, and it's not even the case > in mathematics. Given: > > x ∈ ℝ, x = 2 (reals) > y ∈ ℕ, y = 2 (natural numbers) > > we have x = y, but since 1/y is undefined (there is no Natural number > 1/2), 1/x != 1/y.
Surely 1/y is perfectly well defined, as only y, not 1/y, is constrained to the natural numbers. -- https://mail.python.org/mailman/listinfo/python-list