[Zope] Future watch: how will python division change affectzope?

Jim Penny jpenny@universal-fasteners.com
Thu, 26 Jul 2001 10:47:42 -0400


On Thu, Jul 26, 2001 at 08:55:36AM -0500, Steve Drees wrote:
> 
> > Chris Withers writes:
> >  > marc lindahl wrote:
> >  > >
> >  > > To me this sounds like a huge mistake -- it's a different
> > escalation rule
> >  > > than any other language.
> >  >
> >  > Go to agree with that. What are the reasons _for_ doing this?
> > Most people without knowledge of "C" derived programming languages
> > are astonished that "1/2" can be "0".
> 
> 
> Marc & Chris are wrong here. Every 3rd grader in the US knows that 1/2 is
> not 0.
> So I would say that (american) english agrees with the proposed new division
> rules in python.
> 

This is not the place to discuss this.  But the integer operation is
'gazinta', not divide.   As in, 8 gazinta 59 7 times with remainder 3.
If you really want to improve integer division, it should return a 
tuple, (dividend, remainder), especially since almost all hardware
finds both simultaneously.

That would break too much code also.  But at least it is sound 
mathematically (both grade school and graduate school) and far 
less expensive computationally.

For those who are too young to remember their gazintas (or not
American enough), that was what the phrase 'goes in to' degenerates
into after a bunch of grade schoolers are chanting it.

That is, divide is defined differently over the group of integers,
than over the field of rationals or of real numbers.  It is a 
notational confusion that the integer 1 and the rational 1/1 have
the same notation.  It happens to be a useful confusion in most
contexts.  This is not one of them.

Jim Penny

BTW:  I thought that last I saw Guido was leaning against this
PEP.

> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>