The main python newsgroup (comp.lang.python) is intensely discussing a proposal to change the way the language handles integer division.
Currently in Python int/int evaluates to an int. So 5/2=2.
This is apparently confusing to newbies and is scheduled to be changed.|
Proposed changes include:
Changing int/int to evaluate to a float. So 5/2=2.5
And most controversially of all:
Having 2 division operators.
// which would behave the old way "int//int==int".
And changing the meaning of the old division operator so that (int/int==float).
This of course would break any code using divide and conquer algorithms that are dependent on integer division.
One of the interesting facts that came out of this debate is that in languages like Java, C and C++ int/int==int whilst in Perl and Scheme int/int==float.
Useful places for an understanding of the issues:
[the original proposal]
[some of the threads on the topic]