[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] Eric: interactive shell does not recognize
From: Parzival Herzog <parzp () shaw ! ca>
Date: 2004-09-30 19:45:55
Message-ID: 200409301445.55514.parzp () shaw ! ca
[Download RAW message or body]
I'm using eric-snapshot-20040912
I can't get true division to work in the eric3 interactive shell.
Here's a transcript:
-----------------------------------------------------
Python 2.3 (No.2, Aug 31 2003, 17:27:29)
[GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on lobsang.wp.shawcable.net,
Qt-Version
>>> 3/5
0
>>> import operator
>>> operator.div(3,5)
0
>>> operator.truediv(3,5)
0.59999999999999998
>>> from __future__ import division
>>> 3/5
0
>>>
----------------------------------------------------
Here is the same thing at an interactive terminal:
----------------------------------------------------
[parz@lobsang src]$ python
Python 2.3 (#2, Aug 31 2003, 17:27:29)
[GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 3/5
0
>>> import operator
>>> operator.div(3,5)
0
>>> operator.truediv(3,5)
0.59999999999999998
>>> from __future__ import division
>>> 3/5
0.59999999999999998
>>>
----------------------------------------------------
I've also tried this with PyCrust (wxWidgets interactive shell), and Idle,
and they all show true division result for 3/5 == 0.6 after the __future__
import.
So something is not right with the eric3 shell. I don't know if this is only
the case for true division, or if it is generally the case for __future__
imports.
--
Parzival Herzog
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic