<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Agreed. This would be similar to:<br><br>py> 1 + 1.0<br><br>Traceback: can only add int to int. Etc.
<br><br>But then again, the unimaginative defense would be that it wouldn't be<br>python if you could catentate a list and a tuple.</blockquote><div><br>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?
<br><br>Seeing<br><br>>>> 0xffffffffffffffffff+1.0==float(0xffffffffffffffffff)<br>True<br><br>Is considerably more irritating than your hypothetical Traceback would be.<br><br></div><br></div>