|
10 | 10 | * To avoid confusing existing tools that analyze import statements and expect to |
11 | 11 | find the modules they're importing. |
12 | 12 |
|
13 | | -* To ensure that future_statements run under releases prior to 2.1 at least |
14 | | - yield runtime exceptions (the import of :mod:`__future__` will fail, because |
15 | | - there was no module of that name prior to 2.1). |
| 13 | +* To ensure that :ref:`future statements <future>` run under releases prior to |
| 14 | + 2.1 at least yield runtime exceptions (the import of :mod:`__future__` will |
| 15 | + fail, because there was no module of that name prior to 2.1). |
16 | 16 |
|
17 | 17 | * To document when incompatible changes were introduced, and when they will be |
18 | 18 | --- or were --- made mandatory. This is a form of executable documentation, and |
@@ -56,7 +56,37 @@ argument to the built-in function :func:`compile` to enable the feature in |
56 | 56 | dynamically compiled code. This flag is stored in the :attr:`compiler_flag` |
57 | 57 | attribute on :class:`_Feature` instances. |
58 | 58 |
|
59 | | -No feature description will ever be deleted from :mod:`__future__`. |
| 59 | +No feature description will ever be deleted from :mod:`__future__`. Since its |
| 60 | +introduction in Python 2.1 the following features have found their way into the |
| 61 | +language using this mechanism: |
| 62 | + |
| 63 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 64 | +| feature | optional in | mandatory in | effect | |
| 65 | ++==================+=============+==============+=============================================+ |
| 66 | +| nested_scopes | 2.1.0b1 | 2.2 | :pep:`227`: | |
| 67 | +| | | | *Statically Nested Scopes* | |
| 68 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 69 | +| generators | 2.2.0a1 | 2.3 | :pep:`255`: | |
| 70 | +| | | | *Simple Generators* | |
| 71 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 72 | +| division | 2.2.0a2 | 3.0 | :pep:`238`: | |
| 73 | +| | | | *Changing the Division Operator* | |
| 74 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 75 | +| absolute_import | 2.5.0a1 | 2.7 | :pep:`328`: | |
| 76 | +| | | | *Imports: Multi-Line and Absolute/Relative* | |
| 77 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 78 | +| with_statement | 2.5.0a1 | 2.6 | :pep:`343`: | |
| 79 | +| | | | *The "with" Statement* | |
| 80 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 81 | +| print_function | 2.6.0a2 | 3.0 | :pep:`3105`: | |
| 82 | +| | | | *Make print a function* | |
| 83 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 84 | +| unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: | |
| 85 | +| | | | *Bytes literals in Python 3000* | |
| 86 | ++------------------+-------------+--------------+---------------------------------------------+ |
| 87 | +| barry_as_FLUFL | 3.1.0a1 | 3.9 | :pep:`401`: | |
| 88 | +| | | | *BDFL Retirement* | |
| 89 | ++------------------+-------------+--------------+---------------------------------------------+ |
60 | 90 |
|
61 | 91 | .. seealso:: |
62 | 92 |
|
|
0 commit comments