How did the new division ever get approved?! That's not pythonic! What if you then need to divide two integers and find an element in a list or dict? It will give you an error! I know that at the moment it is not implemented unless imported from __future__, but I expect that it eventually might be. That would be a problem with backwards compatibility.
<br><br><div><span class="gmail_quote">On 2/27/07, <b class="gmail_sendername">Bjoern Schliessmann</b> <<a href="mailto:usenet-mail-0306.20.chr0n0ss@spamgourmet.com">usenet-mail-0306.20.chr0n0ss@spamgourmet.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><a href="mailto:yinglcs@gmail.com">yinglcs@gmail.com</a> wrote:<br><br>> def compareValue(n1, n2):
<br>>     i1 = int(n1)<br>>     i2 = int(n2)<br>><br>>     dx = abs(i2 - i1)/min(i2, i1)<br>>     print dx<br>>     return dx < 0.05<br><br>You could also prepend<br><br>from __future__ import division
<br><br>Regards,<br><br><br>Björn<br><br>--<br>BOFH excuse #237:<br><br>Plate voltage too low on demodulator tube<br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list
</a><br></blockquote></div><br>