6 Mar
2014
6 Mar
'14
5:17 p.m.
On Fri, Mar 7, 2014 at 10:59 AM, Cameron Simpson
Aside: Unless you do something obtuse, like make "3F" be a regular number with a special internal flag which is treated differently on the right hand side of a division operation: if encoutered, division now returns a Fraction instead of an int or float; this feels like something that could easily have nasty side effects.
Thanks, now I can take the paper bag off my head. I'm not the only one! I thought exactly what you say here, that 3F would have to be a magical type of integer. But actually, all it has to be is Fraction(3) and everything will work perfectly.
1/Fraction(3) Fraction(1, 3)
ChrisA