How about adding rational fraction to Python?

D'Arcy J.M. Cain darcy at druid.net
Tue Feb 26 09:29:55 EST 2008


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.

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list