The introspect module

Helper functions to inspect and document objects.

decision_tree(lexicon, build=False)[source]

Yield all rules of the lexicon, including variations.

Every rule is a tuple. Items are members of the tuple. A variation (choice) is indicated by a frozenset, which again contains tuples. See also parce.ruleitem.variations_tree().

If build is set to True, Pattern objects are built and ArgItem instances are replaced.


Return a list of all the lexicons in the language.


Yield all rule items in a language, flattening all RuleItem instances.


Return the set of all the StandardAction instances in the language.

Does not follow targets to other languages.


Return the set of all languages that this language refers to.

Does not follow targets from languages that are referred to.