[Python-checkins] CVS: python/dist/src/Doc/ref refa1.tex,1.5,1.6
Michael Hudson
mwh@users.sourceforge.net
Mon, 27 Aug 2001 13:02:19 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Doc/lib libcode.tex,1.12,1.13 libcodeop.tex,1.3,1.4 libfuncs.tex,1.81,1.82
- Next message: [Python-checkins] CVS: python/dist/src/Lib rfc822.py,1.60,1.61 urllib.py,1.132,1.133 urllib2.py,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv30254/ref
Modified Files:
refa1.tex
Log Message:
Docs for the PEP 264 changes.
Index: refa1.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/refa1.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** refa1.tex 2001/03/28 16:55:53 1.5
--- refa1.tex 2001/08/27 20:02:17 1.6
***************
*** 41,52 ****
\end{itemize}
! The only feature recognized by Python 2.1 is \samp{nested_scopes}.
! A future statement is recognized and treated specially at compile time:
! Changes to the semantics of core constructs are often implemented by
! generating different code. It may even be the case that a new feature
! introduces new incompatible syntax (such as a new reserved word), in
! which case the compiler may need to parse the module differently. Such
! decisions cannot be pushed off until runtime.
For any given release, the compiler knows which feature names have been
--- 41,55 ----
\end{itemize}
! The features recognized by Python 2.2 are \samp{generators},
! \samp{division} and \samp{nested_scopes}. \samp{nested_scopes}
! is redundant in 2.2 as the nested scopes feature is active by default.
! A future statement is recognized and treated specially at compile
! time: Changes to the semantics of core constructs are often
! implemented by generating different code. It may even be the case
! that a new feature introduces new incompatible syntax (such as a new
! reserved word), in which case the compiler may need to parse the
! module differently. Such decisions cannot be pushed off until
! runtime.
For any given release, the compiler knows which feature names have been
***************
*** 73,78 ****
Code compiled by an exec statement or calls to the builtin functions
\function{compile()} and \function{execfile()} that occur in a module
! \module{M} containing a future statement will use the new syntax or
! semantics associated with the future statement.
A future statement typed at an interactive interpreter prompt will
--- 76,84 ----
Code compiled by an exec statement or calls to the builtin functions
\function{compile()} and \function{execfile()} that occur in a module
! \module{M} containing a future statement will, by default, use the new
! syntax or semantics associated with the future statement. This can,
! starting with Python 2.2 be controlled by optional arguments to
! \function{compile()} --- see the documentation of that function in the
! library reference for details.
A future statement typed at an interactive interpreter prompt will
***************
*** 111,115 ****
\begin{verbatim}
! FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease ")"
\end{verbatim}
--- 117,122 ----
\begin{verbatim}
! FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease ","
! CompilerFlag ")"
\end{verbatim}
***************
*** 143,146 ****
--- 150,158 ----
Instances of class \class{_Feature} have two corresponding methods,
\method{getOptionalRelease()} and \method{getMandatoryRelease()}.
+
+ CompilerFlag is the (bitfield) flag that should be passed in the
+ fourth argument to the builtin function \function{compile()} to enable
+ the feature in dynamically compiled code. This flag is stored in the
+ \member{compiler_flag} attribute on \class{_Future} instances.
No feature description will ever be deleted from \module{__future__}.
- Previous message: [Python-checkins] CVS: python/dist/src/Doc/lib libcode.tex,1.12,1.13 libcodeop.tex,1.3,1.4 libfuncs.tex,1.81,1.82
- Next message: [Python-checkins] CVS: python/dist/src/Lib rfc822.py,1.60,1.61 urllib.py,1.132,1.133 urllib2.py,1.20,1.21
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]