mirror of https://github.com/python/cpython
markup updates
This commit is contained in:
parent
1b1ca0cc2b
commit
74530ff4f9
|
@ -25,13 +25,14 @@
|
||||||
|
|
||||||
Each statement in \file{__future__.py} is of the form:
|
Each statement in \file{__future__.py} is of the form:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{alltt}
|
||||||
FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease ","
|
FeatureName = "_Feature(" \var{OptionalRelease} "," \var{MandatoryRelease} ","
|
||||||
CompilerFlag ")"
|
\var{CompilerFlag} ")"
|
||||||
\end{verbatim}
|
\end{alltt}
|
||||||
|
|
||||||
where, normally, OptionalRelease is less then MandatoryRelease, and
|
where, normally, \var{OptionalRelease} is less than
|
||||||
both are 5-tuples of the same form as \code{sys.version_info}:
|
\var{MandatoryRelease}, and both are 5-tuples of the same form as
|
||||||
|
\code{sys.version_info}:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int
|
(PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int
|
||||||
|
@ -42,28 +43,27 @@ both are 5-tuples of the same form as \code{sys.version_info}:
|
||||||
)
|
)
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
OptionalRelease records the first release in which the feature was
|
\var{OptionalRelease} records the first release in which the feature
|
||||||
accepted.
|
was accepted.
|
||||||
|
|
||||||
In the case of MandatoryReleases that have not yet occurred,
|
In the case of a \var{MandatoryRelease} that has not yet occurred,
|
||||||
MandatoryRelease predicts the release in which the feature will become
|
\var{MandatoryRelease} predicts the release in which the feature will
|
||||||
part of the language.
|
become part of the language.
|
||||||
|
|
||||||
Else MandatoryRelease records when the feature became part of the
|
Else \var{MandatoryRelease} records when the feature became part of
|
||||||
language; in releases at or after that, modules no longer need a
|
the language; in releases at or after that, modules no longer need a
|
||||||
future statement to use the feature in question, but may continue to
|
future statement to use the feature in question, but may continue to
|
||||||
use such imports.
|
use such imports.
|
||||||
|
|
||||||
MandatoryRelease may also be \code{None}, meaning that a planned
|
\var{MandatoryRelease} may also be \code{None}, meaning that a planned
|
||||||
feature got dropped.
|
feature got dropped.
|
||||||
|
|
||||||
Instances of class \class{_Feature} have two corresponding methods,
|
Instances of class \class{_Feature} have two corresponding methods,
|
||||||
\method{getOptionalRelease()} and \method{getMandatoryRelease()}.
|
\method{getOptionalRelease()} and \method{getMandatoryRelease()}.
|
||||||
|
|
||||||
CompilerFlag is the (bitfield) flag that should be passed in the
|
\var{CompilerFlag} is the (bitfield) flag that should be passed in the
|
||||||
fourth argument to the builtin function \function{compile()} to enable
|
fourth argument to the builtin function \function{compile()} to enable
|
||||||
the feature in dynamically compiled code. This flag is stored in the
|
the feature in dynamically compiled code. This flag is stored in the
|
||||||
\member{compiler_flag} attribute on \class{_Future} instances.
|
\member{compiler_flag} attribute on \class{_Future} instances.
|
||||||
|
|
||||||
No feature description will ever be deleted from \module{__future__}.
|
No feature description will ever be deleted from \module{__future__}.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue