Package epydoc :: Package markup :: Module restructuredtext :: Class ParsedRstDocstring
[hide private]
[frames] | no frames]

ClassType ParsedRstDocstring

source code


An encoded version of a ReStructuredText docstring. The contents of the docstring are encoded in the _document instance variable.

Instance Methods [hide private]
 
__init__(self, document) source code
call graph 
(ParsedDocstring, list of Field)
split_fields(self, errors=None)
Split this docstring into its body and its fields.
source code
call graph 
(ParsedDocstring, bool)
summary(self)
Returns: A pair consisting of a short summary of this docstring and a boolean value indicating whether there is further documentation in addition to the summary.
source code
call graph 
string
to_html(self, docstring_linker, directory=None, docindex=None, context=None, **options)
Translate this docstring to HTML.
source code
call graph 
string
to_latex(self, docstring_linker, directory=None, docindex=None, context=None, **options)
Translate this docstring to LaTeX.
source code
string
to_plaintext(self, docstring_linker, **options)
Translate this docstring to plaintext.
source code
call graph 
 
__repr__(self) source code
list of ParsedDocstring
index_terms(self)
Returns: The list of index terms that are defined in this docstring.
source code
call graph 

Inherited from ParsedDocstring: __add__, concatenate

Instance Variables [hide private]
docutils.nodes.document _document
A ReStructuredText document, encoding the docstring.
Method Details [hide private]

__init__(self, document)
(Constructor)

source code 
call graph 
Parameters:
  • document (docutils.nodes.document)

split_fields(self, errors=None)

source code 
call graph 

Split this docstring into its body and its fields.

Parameters:
  • errors - A list where any errors generated during splitting will be stored. If no list is specified, then errors will be ignored.
Returns: (ParsedDocstring, list of Field)
A tuple (body, fields), where body is the main body of this docstring, and fields is a list of its fields. If the resulting body is empty, return None for the body.
Overrides: ParsedDocstring.split_fields
(inherited documentation)

summary(self)

source code 
call graph 
Returns: (ParsedDocstring, bool)
A pair consisting of a short summary of this docstring and a boolean value indicating whether there is further documentation in addition to the summary. Typically, the summary consists of the first sentence of the docstring.
Overrides: ParsedDocstring.summary
(inherited documentation)

to_html(self, docstring_linker, directory=None, docindex=None, context=None, **options)

source code 
call graph 

Translate this docstring to HTML.

Parameters:
  • docstring_linker - An HTML translator for crossreference links into and out of the docstring.
  • options - Any extra options for the output. Unknown options are ignored.
Returns: string
An HTML fragment that encodes this docstring.
Overrides: ParsedDocstring.to_html
(inherited documentation)

to_latex(self, docstring_linker, directory=None, docindex=None, context=None, **options)

source code 

Translate this docstring to LaTeX.

Parameters:
  • docstring_linker - A LaTeX translator for crossreference links into and out of the docstring.
  • options - Any extra options for the output. Unknown options are ignored.
Returns: string
A LaTeX fragment that encodes this docstring.
Overrides: ParsedDocstring.to_latex
(inherited documentation)

to_plaintext(self, docstring_linker, **options)

source code 
call graph 

Translate this docstring to plaintext.

Parameters:
  • docstring_linker - A plaintext translator for crossreference links into and out of the docstring.
  • options - Any extra options for the output. Unknown options are ignored.
Returns: string
A plaintext fragment that encodes this docstring.
Overrides: ParsedDocstring.to_plaintext
(inherited documentation)

index_terms(self)

source code 
call graph 
Returns: list of ParsedDocstring
The list of index terms that are defined in this docstring. Each of these items will be added to the index page of the documentation.
Overrides: ParsedDocstring.index_terms
(inherited documentation)