Language change and code breaks

Mikael Olofsson mikael at isy.liu.se
Thu Jul 12 02:38:41 EDT 2001


On 11-Jul-2001 Nick Perkins wrote:
 >  but why not leave int/int->int alone,
 >  and use // for int//int->float.
 >  
 >  No code breaks, and it is almost as easy for the newbies.
 >  
 >  1/2 -> 0
 >  1//2 -> 0.5
 >  
 >  That way we still have / = div, % = mod,
 >  and we add // = float-divide.

Being in EE, I would immediately interprete a//b as two resistors, a and
b, in parallel. Thus, I would expect 1//2 to return 0.666666...

just-half-joking-ly y'rs
/Mikael

-----------------------------------------------------------------------
E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael               
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date:    12-Jul-2001
Time:    08:33:18

         /"\
         \ /     ASCII Ribbon Campaign
          X      Against HTML Mail
         / \

This message was sent by XF-Mail.
-----------------------------------------------------------------------




More information about the Python-list mailing list