"Christoph Zwerschke" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

> Anyway this would be an argument only against the variant of typecasting a 
> float with a fractional part. But what about the other variant which 
> raises an error if there is a fractional part, but works if the float is 
> actually an exact integer, like the result of 4.0//2.

I think that's a really bad idea, because of the possibility that the result 
might happen to be an exact integer on one implementation but not another. 
In such situations, the fact that it might fail on implementation X may well 
be impossible to detect by any amount of testing on implementation Y.  Such 
untestable errors are such a nuisance that it would better for the language 
to encourage programmers to give them a wide berth.


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to