Re: Fractions as result from divisions

2009-07-08 Thread Hans Nowak
Ulrich Eckhardt wrote: Bearophile wrote: For example a novice wants to see 124 / 38 to return the 62/19 fraction and not 3 or 3.263157894736842 :-) Python has adopted the latter of the three for operator / and the the second one for operator //. I wonder if it was considered to just return a f

Re: Fractions as result from divisions (was: Re: tough-to-explain Python)

2009-07-08 Thread Steven D'Aprano
On Wed, 08 Jul 2009 11:24:28 +0200, Ulrich Eckhardt wrote: > Bearophile wrote: >> For example a novice wants to see 124 / 38 to return the 62/19 fraction >> and not 3 or 3.263157894736842 :-) > > Python has adopted the latter of the three for operator / and the the > second one for operator //.

Re: Fractions as result from divisions (was: Re: tough-to-explain Python)

2009-07-08 Thread kj
In Ulrich Eckhardt writes: >Bearophile wrote: >> For example a novice wants to see 124 / 38 to return the 62/19 >> fraction and not 3 or 3.263157894736842 :-) >Python has adopted the latter of the three for operator / and the the second >one for operator //. I wonder if it was considered to ju

Fractions as result from divisions (was: Re: tough-to-explain Python)

2009-07-08 Thread Ulrich Eckhardt
Bearophile wrote: > For example a novice wants to see 124 / 38 to return the 62/19 > fraction and not 3 or 3.263157894736842 :-) Python has adopted the latter of the three for operator / and the the second one for operator //. I wonder if it was considered to just return a fraction from that opera