| find the modules they're importing. |
| |
| * To ensure that future_statements run under releases prior to 2.1 at least |
| yield runtime exceptions (the import of :mod:`__future__` will fail, because |
| there was no module of that name prior to 2.1). |
| |
| * To document when incompatible changes were introduced, and when they will be |
| --- or were --- made mandatory. This is a form of executable documentation, and |
n | can be inspected programatically via importing :mod:`__future__` and examining |
n | can be inspected programmatically via importing :mod:`__future__` and examining |
| its contents. |
| |
| Each statement in :file:`__future__.py` is of the form:: |
| |
t | FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," |
t | FeatureName = _Feature(OptionalRelease, MandatoryRelease, |
| CompilerFlag ")" |
| CompilerFlag) |
| |
| |
| where, normally, *OptionalRelease* is less than *MandatoryRelease*, and both are |
| 5-tuples of the same form as ``sys.version_info``:: |
| |
| (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int |
| PY_MINOR_VERSION, # the 1; an int |
| PY_MICRO_VERSION, # the 0; an int |