Agreed. This would be similar to:

py> 1 + 1.0

Traceback: can only add int to int. Etc.

But then again, the unimaginative defense would be that it wouldn't be
python if you could catentate a list and a tuple.


Of course, that behaviour would be quite defensible; auto-casting int to
float is _wrong_, especially with python implementing abitrary precision
integers.  Integers are more precise than floats, so why would you
automatically cast them in that direction?

Seeing

0xffffffffffffffffff+1.0==float(0xffffffffffffffffff)
True

Is considerably more irritating than your hypothetical Traceback would be.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to