[IronPython] true division?

Gary Stephenson garys at ihug.com.au
Fri Sep 22 00:03:58 CEST 2006


Thanks John (and Seo),

When I attempt the same thing I get: 

IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import __future__
Traceback (most recent call last):
  File , line 0, in <stdin>##3
  File , line 0, in __import__##7
ImportError: No module named __future__
>>>

???  I'm at a loss ...

cheers,

gary
----- Original Message ----- 
From: "John Machin" <sjmachin at lexicon.net>
To: "Discussion of IronPython" <users at lists.ironpython.com>
Sent: Thursday, September 21, 2006 7:46 PM
Subject: Re: [IronPython] true division?


> On 21/09/2006 7:27 PM, Sanghyeon Seo wrote:
>> 2006/9/21, Gary Stephenson <garys at ihug.com.au>:
>>> Is there a way to get true division in ipy without using the -Qnew 
>>> command
>>> line option?  On a per-module or per-instance basis?
>>>
>>> "from __future__ import true_division"
>>> returns "SyntaxError: future feature is not defined: true_division"
>>
>> Of course. The correct syntax is:
>> from __future__ import division
>>
>
> Indeed. And introspection is a wonderful thing :-)
>
> DOS_prompt>\ironpython\ipy
> IronPython 1.0.60816 on .NET 2.0.50727.42
> Copyright (c) Microsoft Corporation. All rights reserved.
> >>> import __future__
> >>> [x for x in __future__.all_feature_names if 'div' in x]
> ['division']
> >>> ^Z
>
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> 




More information about the Ironpython-users mailing list