[MATRIX-SIG] integer division -- what a concept!

Geoffrey M. Furnish furnish@xdiv.lanl.gov
Tue, 20 Jan 1998 15:14:03 GMT


Rupert Mazzucco writes:
 > On Fri, 16 Jan 1998, Paul F. Dubois wrote:
 > 
 > > There is a long-established history of this behavior in both Fortran and C.
 > 
 > As I said, I'm aware of this.
 > But both Fortran and C are *old* languages.
 > Wasn't Python set to be a *modern* language 
 > and easy-to-learn? 
 > 
 > Experienced programmers may be know that 2/3 == 0,
 > and even make use of it; nevertheless this behaviour is
 > guaranteed to confuse beginners. And it introduces
 > a possibility for errors that are really hard to find.

And it confused me too, though I am hardly a newbie, b/c I didn't
actually know that my two and my three, were integers.  I have
littered my code now with float(x) and float(y), to promote my input
variables to the right type, but I have to say, this is hideously
ugly.

I suppose in the final analysis, I am really not a fa of dyamic
typing.  

I am also not a fan of keyboards that don't reliably transmit the n
key...

-- 
Geoffrey Furnish                    email: furnish@lanl.gov
LANL XTM Radiation Transport/POOMA  phone: 505-665-4529     fax: 505-665-5538

"Software complexity is an artifact of implementation."    -Dan Quinlan

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________