Dividing integers...Convert to float first?

Thomas Ploch Thomas.Ploch at gmx.net
Fri Jan 5 18:55:03 CET 2007


Grant Edwards schrieb:
> On 2007-01-05, Jonathan Smith <smithj at rpath.com> wrote:
> 
>>>>> from __future__ import division
>>>>> 1/2
>> 0.5
> 
>    $ python
>    Python 2.4.3 (#1, Dec 10 2006, 22:09:09) 
>    [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
>    Type "help", "copyright", "credits" or "license" for more
>    information.
>    >>> from __future__ import LotteryNumbers
>      File "<stdin>", line 1
>    SyntaxError: future feature LotteryNumbers is not defined
>    >>> 
> 
> Damn.  
> 
> I guess it's back to work then.
> 

You are working as an oracle?

:-)

Thomas



More information about the Python-list mailing list