import from future

Marc 'BlackJack' Rintsch bj_666 at
Sun Jan 28 08:33:32 CET 2007

In <1169969100.946843.111770 at>, lee wrote:

> what are the things that we can do with import from future usage.....i 
> heard its very interesting......thanks

Here's how to find out yourself (done with a 2.4 release):

In [2]: import __future__

In [3]: dir(__future__)

In [4]: __future__.all_feature_names
Out[4]: ['nested_scopes', 'generators', 'division']

In [5]: __future__.division
Out[5]: _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)

In [6]: help(__future__)
<snipped help output>

	Marc 'BlackJack' Rintsch

More information about the Python-list mailing list