Comment on PEP-0238

Bjorn Pettersen BPettersen at NAREX.com
Fri Jul 6 11:36:22 EDT 2001


> From: Guido van Rossum [mailto:guido at python.org]
> 
> "Robert J. Harrison" <rjh at 3-cities.com> writes:
> 
> > Again, my major objection to this proposal is that it gives us
> > nothing and breaks a lot of existing code.
> 
> Other educators disagree.  Take the case of VPython.
> 
> The VPython folks have used Python very successfully to teach freshman
> physics students at Carnegie Mellon to create 3D models.  Many
> students had little or no programming experience.  The goal of the
> course wasn't to teach programming, it was to teach understanding of
> physics.  Throughout the course, students were writing Python programs
> implementibg various laws of physics.  Here's a quote from Bruce
> Sherwood, one of the teachers (without permission, but I'm sure he
> doesn't mind):

[snip]

Ok, let's agree that studies have shown that when using Python for
educational purposes to teach somthing besides Python, then having
integer division return float results causes less surprise. Let's
further hypothesize that when using Python to teach programming (either
as a first or a secondary language) that it would be less surprising for
a majority of the students to have integer division return float
results. That still leaves a ton of professional programmers that for
years have relied on the current semantics with broken code. E.g. in my
case, I know there is code I wrote that is running at my last employer
that would most probably silently start returning incorrect results.

Even if having integer division returning float results would have been
the right decision when Python started out (and I believe that it would
have been), it is now simply too late to change and the reasons for
changing at _this_ point are simply not compelling enough to break that
much code.

Sometimes when you make a mistake, you just have to learn to live with
it.

-- bjorn




More information about the Python-list mailing list