This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nassrat
Recipients mark.dickinson, nassrat, pitrou
Date 2008-12-01.11:43:02
SpamBayes Score 1.6174839e-12
Marked as misclassified No
Message-id <2238dbfb0812010343x1fe5c0c5q6016234ba54f30b5@mail.gmail.com>
In-reply-to <1228130126.92.0.401248751119.issue4479@psf.upfronthosting.co.za>
Content
On Mon, Dec 1, 2008 at 7:15 AM, Mark Dickinson <report@bugs.python.org> wrote:
> Well, there are precedents:
>
>>>> type(2**3)
> <type 'int'>
>>>> type(2**-3)
> <type 'float'>
>
> My initial reaction to this was negative, but I'm struggling to think of
> situations where it would be bad.  I'm also struggling to think of
> situations where it would be useful.   Maybe Monday morning is just a
> bad time for thinking. :-)
>
> Might be worth a discussion on python-ideas, at least?

I don't know about the internal representations in python, but I
believe ints can be larger than ints. Nevertheless your example there
which would have drove me nuts if I found it :-). I like the true
division feature, but I find it too far deviant, if all of a sudden
code started producing floats instead of ints, on a given upgrade of
python someday soon.

I think the result should be int if it is an int, but float if and
only if it is really needed.

I think your right, this conversation should probably move to python
ideas, since this was by design and not a bug. (but I do not really
like this part of the "feature").
History
Date User Action Args
2008-12-01 11:43:04nassratsetrecipients: + nassrat, mark.dickinson, pitrou
2008-12-01 11:43:03nassratlinkissue4479 messages
2008-12-01 11:43:02nassratcreate