How about adding rational fraction to Python?
Jeff Schwab
jeff at schwabcenter.com
Tue Feb 26 17:08:21 EST 2008
J. Cliff Dyer wrote:
> On Tue, 2008-02-26 at 13:51 -0500, D'Arcy J.M. Cain wrote:
>> On Tue, 26 Feb 2008 13:39:38 -0500
>> "J. Cliff Dyer" <jcd at sdf.lonestar.org> wrote:
>>>>>> a = 20000 * 20000
>>>>>> b = 200000 * 200000
>>>>>> type(a)
>>> <type 'int'>
>>>>>> type(b)
>>> <type 'long'>
>> A long int is still integral which is the crux of the issue.
>>
>
> So do you believe that you should not be able to do natural division
> without explicitly casting ints as floats, or is your concern just that
> you want to still be able to to integer division simply?
I think the issue is whether this qualifies as "natural" division in the
first place. (For the record, I'm only semi-old-school.)
More information about the Python-list
mailing list