Ian Bicking: the old part of his blog

Re ruby and python compared comment 000

In Python 7/3 is still 2. It probably will be until Python 3.0; Guido regrets the original decision, but changing it before 3.0 is way too big a problem. This isn't a reflection of some deep design principle in the language.

Python does not allow a library to change what 7/3 evaluates to. Here Python the language is taking over, where in Ruby a library can effect this.

This program:

from __future__ import division

print 7/3

prints out 2.33333333 in Python 2.3 and newer. And 7//3 gives the old division behaviour which produces 2.

Comment on Re: Ruby and Python Compared
by hanz


But it won't change the behaviour of / operator in other modules.

# Baczek