Re: Python 3000 deat !? Is true division ever coming ?

2006-02-20 Thread Dave Hansen
Caution: bunny trail ahead. Feel free to skip this message, as it contains no useful content whatever... On Sat, 18 Feb 2006 12:09:02 +1100 in comp.lang.python, Steven D'Aprano [EMAIL PROTECTED] wrote: [...] I've never even used Matlab. But I have a calculator. (Actually I have about half a

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-20 Thread Magnus Lycka
Steven D'Aprano wrote: 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. There is no guessing

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-20 Thread Magnus Lycka
Steve Holden wrote: [EMAIL PROTECTED] wrote: My main point was/is: why is there not more discussion about true division !!? You are about three years too late for the discussion. It was debated to death when Guido proposed that Python should behave more like non-programmers expected it

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-18 Thread Dan Bishop
Magnus Lycka wrote: Gregory Piñero wrote: I knew about that approach. I just wanted less typing :-( It's enough to introduce one float in the mix. 1.*a/b or float(a)/b if you don't want one more multiplication. That doesn't work if either a or b is a Decimal. What *could* work is def

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-18 Thread Steve Holden
[EMAIL PROTECTED] 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.

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Steven D'Aprano
On Thu, 16 Feb 2006 20:55:42 -0800, seb.haase wrote: I don't think Because this change might break code, it's being introduced very gradually. Python 2.2 begins the transition, but the switch won't be complete until Python 3.0. says enough. I'm not sure what else should be said. Should I

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread seb . haase
Thanks for the replies, But to point out what the subject of this thread is (sorry for the typo ;-) : There is a PEP (proposal 238) to change Python so that 5/2 WOULD do the true division -- and obviously break lots of code. Just type this in your python interpeter: from __future__ import

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Magnus Lycka
Gregory Piñero wrote: I knew about that approach. I just wanted less typing :-( It's enough to introduce one float in the mix. 1.*a/b or float(a)/b if you don't want one more multiplication. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Rocco Moretti
Steven D'Aprano wrote: Anybody using Python *should* be aware of the division issue. As soon as they see a division, it is their responsibility to *find out what it means*. That doesn't require much work: they can scroll up to the beginning of the module and look at the first few lines.

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: Hi, Is it true that that Python 3000 is dead ? I think you should view Python 3000 as a metaphor for Python as it would look if we didn't have to care about backward compatibility. Before this name appeared, Guido used to talk about Python 3.0 as a version where bad

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread seb . haase
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

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Steven D'Aprano
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

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-17 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] not actively encouraged. The tutorial, which is maintained and updated, still describes old style classes, and the old division behaviour. Perhaps the tutorials needs updating. My main point was/is: why is there not more discussion

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-14 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: Hi, Is it true that that Python 3000 is dead ? Honestly I think that e.g. changing 5/2 to be 2.5 (instead of 2) would just break to much code :-( On the otherhand I'm using Python as Matlab replacement and would generally like 5/2 ==2.5 ... It's Comp. Sci. 101,

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-14 Thread Gregory Piñero
On 14 Feb 2006 06:44:02 -0800, [EMAIL PROTECTED] 5./2.=2.5 is floating point math, with all the round off errors that incorporates. Thanks Curtis, I never knew that trick. I guess for variables do have true division you have to make them floats? e.g. float(var1)/float(var2)? Or do you know

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-14 Thread Rocco Moretti
Gregory Piñero wrote: On 14 Feb 2006 06:44:02 -0800, [EMAIL PROTECTED] 5./2.=2.5 is floating point math, with all the round off errors that incorporates. Thanks Curtis, I never knew that trick. I guess for variables do have true division you have to make them floats? e.g.

Re: Python 3000 deat !? Is true division ever coming ?

2006-02-14 Thread Gregory Piñero
I knew about that approach. I just wanted less typing :-( On 2/14/06, Rocco Moretti [EMAIL PROTECTED] wrote: Gregory Piñero wrote: On 14 Feb 2006 06:44:02 -0800, [EMAIL PROTECTED] 5./2.=2.5 is floating point math, with all the round off errors that incorporates. Thanks Curtis, I

Python 3000 deat !? Is true division ever coming ?

2006-02-12 Thread seb . haase
Hi, Is it true that that Python 3000 is dead ? Honestly I think that e.g. changing 5/2 to be 2.5 (instead of 2) would just break to much code :-( On the otherhand I'm using Python as Matlab replacement and would generally like 5/2 ==2.5 So, I was contemplating to default all my modules/scripts