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
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
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
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
[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.
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
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
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
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.
[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
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
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
[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
[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,
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
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.
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
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
18 matches
Mail list logo