From b387ad6eece2f78a582665df9a07e5b54b38ecd1 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 12 Dec 2010 18:12:40 +0000 Subject: [PATCH] Remove reference to stuff which is already obsolete in 2.x. --- Doc/library/imp.rst | 82 --------------------------------------------- 1 file changed, 82 deletions(-) diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst index 53a1550654a..058e6b6a10e 100644 --- a/Doc/library/imp.rst +++ b/Doc/library/imp.rst @@ -258,88 +258,6 @@ to indicate the search result of :func:`find_module`. The module was found as a frozen module (see :func:`init_frozen`). -The following constant and functions are obsolete; their functionality is -available through :func:`find_module` or :func:`load_module`. They are kept -around for backward compatibility: - - -.. data:: SEARCH_ERROR - - Unused. - - -.. function:: init_builtin(name) - - Initialize the built-in module called *name* and return its module object along - with storing it in ``sys.modules``. If the module was already initialized, it - will be initialized *again*. Re-initialization involves the copying of the - built-in module's ``__dict__`` from the cached module over the module's entry in - ``sys.modules``. If there is no built-in module called *name*, ``None`` is - returned. - - -.. function:: init_frozen(name) - - Initialize the frozen module called *name* and return its module object. If - the module was already initialized, it will be initialized *again*. If there - is no frozen module called *name*, ``None`` is returned. (Frozen modules are - modules written in Python whose compiled byte-code object is incorporated - into a custom-built Python interpreter by Python's :program:`freeze` - utility. See :file:`Tools/freeze/` for now.) - - -.. function:: is_builtin(name) - - Return ``1`` if there is a built-in module called *name* which can be - initialized again. Return ``-1`` if there is a built-in module called *name* - which cannot be initialized again (see :func:`init_builtin`). Return ``0`` if - there is no built-in module called *name*. - - -.. function:: is_frozen(name) - - Return ``True`` if there is a frozen module (see :func:`init_frozen`) called - *name*, or ``False`` if there is no such module. - - -.. function:: load_compiled(name, pathname, [file]) - - .. index:: pair: file; byte-code - - Load and initialize a module implemented as a byte-compiled code file and return - its module object. If the module was already initialized, it will be - initialized *again*. The *name* argument is used to create or access a module - object. The *pathname* argument points to the byte-compiled code file. The - *file* argument is the byte-compiled code file, open for reading in binary mode, - from the beginning. It must currently be a real file object, not a user-defined - class emulating a file. - - -.. function:: load_dynamic(name, pathname[, file]) - - Load and initialize a module implemented as a dynamically loadable shared - library and return its module object. If the module was already initialized, it - will be initialized *again*. Re-initialization involves copying the ``__dict__`` - attribute of the cached instance of the module over the value used in the module - cached in ``sys.modules``. The *pathname* argument must point to the shared - library. The *name* argument is used to construct the name of the - initialization function: an external C function called ``initname()`` in the - shared library is called. The optional *file* argument is ignored. (Note: - using shared libraries is highly system dependent, and not all systems support - it.) - - -.. function:: load_source(name, pathname[, file]) - - Load and initialize a module implemented as a Python source file and return its - module object. If the module was already initialized, it will be initialized - *again*. The *name* argument is used to create or access a module object. The - *pathname* argument points to the source file. The *file* argument is the - source file, open for reading as text, from the beginning. It must currently be - a real file object, not a user-defined class emulating a file. Note that if a - properly matching byte-compiled file (with suffix :file:`.pyc` or :file:`.pyo`) - exists, it will be used instead of parsing the given source file. - .. class:: NullImporter(path_string)