The "pending" element is used to encapsulate a pending operation: the operation (transform), the point at which to apply it, and any data it requires. Only the pending operation's location within the document is stored in the public document tree (by the "pending" object itself); the operation and its data are stored in the "pending" object's internal instance attributes.

For example, say you want a table of contents in your reStructuredText document. The easiest way to specify where to put it is from within the document, with a directive:

.. contents::

But the "contents" directive can't do its work until the entire document has been parsed and possibly transformed to some extent. So the directive code leaves a placeholder behind that will trigger the second phase of its processing, something like this:

<pending ...public attributes...> + internal attributes

Use document.note_pending() so that the docutils.transforms.Transformer stage of processing can run all pending transforms.

Base classes

Implemented Interfaces

There are no implemented interfaces.



Known Subclasses

There are no known subclasses.