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

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

2009-07-08 Thread kj
In c75ei6-e0i@satorlaser.homedns.org Ulrich Eckhardt eckha...@satorlaser.com 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

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 //. Up