[Zope] Future watch: how will python division change affect z ope?

sean.upton@uniontrib.com sean.upton@uniontrib.com
Tue, 24 Jul 2001 18:33:56 -0700


Then again, why force folks to cast when it doesn't make common sense; there
is a clear divide to me between a div operation (pure integer) and a
"divide" operation, and I would opt toward the common-sense interpretation
of /... it only makes sense in a loosely typed scripting language...

The issue of potentially braking old code, that's something else
altogether...  

I don't see why this will affect Zope in any huge way...

Sean

-----Original Message-----
From: marc lindahl [mailto:marc@bowery.com]
Sent: Tuesday, July 24, 2001 6:15 PM
To: zope@zope.org
Subject: Re: [Zope] Future watch: how will python division change affect
zope?


To me this sounds like a huge mistake -- it's a different escalation rule
than any other language.

> From: Tom Jenkins <tjenkins@devis.com>
> 
> For those of you that don't know, PEP238 which is still be thought
> about, will change  how the division operand ('/') works with integers.
> Currently the following is what happens in python
> int/int == int
> 2/1 == 2
> 3/2 == 1
> 3/4 == 0
> 
> under PEP238 this will change to
> int/int == float
> 2/1 == 2.0
> 3/2 == 1.5
> 3/4 == 0.75
> 


_______________________________________________
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 )