How about adding rational fraction to Python?

Steve Holden steve at holdenweb.com
Tue Feb 26 12:10:58 EST 2008


D'Arcy J.M. Cain wrote:
> On Tue, 26 Feb 2008 08:55:22 -0500
> "J. Cliff Dyer" <jcd at sdf.lonestar.org> wrote:
>> Of course.  That's why I think you ought to spell it 3//4.  Nobody gets
>> confused when a strange operator that they've never seen before does
>> something unusual.  Average Jo off the street looks at python code and
>> sees 3/4, and immediately thinks "aha! .75!"  Show the same person 3//4,
> 
> Why do we care what A. Jo thinks?  I would hope that A. Programmer Jo
> would see "int {OP} int" and assume int result.  A. Jo isn't going to be
> debugging anything.
> 
> If 3/4 ever returned 0.75 in any language I would drop that language.
> 
Prepare to drop Python then, as this will be the default behavior in 3.x

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/




More information about the Python-list mailing list