[Python-ideas] Python Numbers as Human Concept Decimal System

Chris Angelico rosuav at gmail.com
Wed Mar 5 16:23:19 CET 2014


On Wed, Mar 5, 2014 at 11:56 PM, Oscar Benjamin
<oscar.j.benjamin at gmail.com> wrote:
> 3F could create a Fraction with the integer value 3 so that a/b gives
> a rational number:
>
>>>> from fractions import Fraction as F
>>>> a = 2
>>>> b = F(3)
>>>> a/b
> Fraction(2, 3)
>
> I don't understand why you say that can't be done.

(Also Steven who said the same thing.)

Uhh... brown-paper-bag moment. When I wrote up that post, I somehow
blanked out the obvious fact that Fraction can happily represent an
integer. Whoops...

As Julia Jellicoe said, my objection falls to the ground. Very well!

ChrisA


More information about the Python-ideas mailing list