Python 3000 deat !? Is true division ever coming ?

Steven D'Aprano steve at REMOVETHIScyber.com.au
Fri Feb 17 20:09:02 EST 2006


On Fri, 17 Feb 2006 14:01:05 -0800, seb.haase wrote:

> Thank you very much, Magnus !
> This is the answer I had been waiting for:
>> A problem as I see it today, is that this behaviour is
>> not actively encouraged. The tutorial, which is maintained
>> and updated, still describes old style classes, and the
>> old division behaviour.
> 
> My main point was/is:  why is there not more discussion about "true
> division" !!?

What is there to discuss?


> Just like the second answer to my posting clearly showed:
> PEOPLE THINK TRUE DIVISION IS "ONLY IN MATLAB"  !!

I've never even used Matlab. But I have a calculator. (Actually I have
about half a dozen calculators.) In every single one of them, 1/2 gives
0.5 instead of 0. I'm even capable of doing that calculation in my head.
So I don't think true division is only in Matlab.


> As you pointed out: the "true division" part of "Python3000" might be
> one of the "scariest" and should therefore be pointed out already in
> the tutorial !!  (It would look quite ugly to newcomers, though)

The tutorial shouldn't talk about Python3000 at all. What would be the
point of that? The tutorial is there to teach about the way Python works
now, not to make guesses and prediction about how it will work some time
in the indefinite future.


> Having said that:  I would vote against EVER introducing true division
> as default - because it will just PISS too many (long time python)
> people OFF. ;-)

Do you realise that the reason true division was introduced into Python
was because many long-time Python programmers requested it? So far from
annoying them, it is a feature that most Python programmers are waiting
for.



-- 
Steven.




More information about the Python-list mailing list