Division considered un-Pythonic (Re: Case-sensitivity: why -- or why not? (was Re: Damnation!))
Remco Gerlich
scarblac-spamtrap at pino.selwerd.nl
Sun Jun 4 14:19:40 EDT 2000
Roy Smith wrote in comp.lang.python:
> piet at cs.uu.nl wrote:
> > As it is now in Python, you can have a==b and c==d both being true, but
> > a/c==b/d being false. Which would be a bad surprise for most people.
>
> What values of a, b, c, and d would cause that? Maybe I'm just being
> dense, but i don't see it.
a = 1, b = 1.0, c = 2, d = 2.0
a==b and c==d, but a/c==0 and b/d==0.5.
--
Remco Gerlich, scarblac at pino.selwerd.nl
Murphy's Rules, "Which is why you get 'em so cheap":
In SPI's Universe, the sword is prohibited from use at any combat
range.
More information about the Python-list
mailing list