diff options
author | Georg Brandl <georg@python.org> | 2008-05-12 18:05:20 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-12 18:05:20 (GMT) |
commit | e6bcc9145e3ecae592dd2e24da5508f34022b920 (patch) | |
tree | 407b0d02ac1d4e16d0d30d6b2795d4d1345201d2 /Doc/library/codeop.rst | |
parent | c73728373c767119271e3813b3f4d182c845a297 (diff) | |
download | cpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.zip cpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.tar.gz cpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.tar.bz2 |
Remove many "versionchanged" items that didn't use the official markup,
but just some text embedded in the docs.
Also remove paragraph about implicit relative imports from tutorial.
Diffstat (limited to 'Doc/library/codeop.rst')
-rw-r--r-- | Doc/library/codeop.rst | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Doc/library/codeop.rst b/Doc/library/codeop.rst index 456f6dd..97b6267 100644 --- a/Doc/library/codeop.rst +++ b/Doc/library/codeop.rst @@ -66,28 +66,3 @@ To do just the former: :func:`compile_command`; the difference is that if the instance compiles program text containing a ``__future__`` statement, the instance 'remembers' and compiles all subsequent program texts with the statement in force. - -A note on version compatibility: the :class:`Compile` and -:class:`CommandCompiler` are new in Python 2.2. If you want to enable the -future-tracking features of 2.2 but also retain compatibility with 2.1 and -earlier versions of Python you can either write :: - - try: - from codeop import CommandCompiler - compile_command = CommandCompiler() - del CommandCompiler - except ImportError: - from codeop import compile_command - -which is a low-impact change, but introduces possibly unwanted global state into -your program, or you can write:: - - try: - from codeop import CommandCompiler - except ImportError: - def CommandCompiler(): - from codeop import compile_command - return compile_command - -and then call ``CommandCompiler`` every time you need a fresh compiler object. - |