Package lepl :: Package matchers :: Module matcher
[hide private]
[frames] | no frames]

Module matcher

source code

Base class for matchers.
Classes [hide private]
Imagine an abstract property called 'factory' below.
Used to flag problems related to matcher types.
Some kind of parent/child management for wrapped classes that I no longer understand, but which appears to be used and working (it doesn't look like rocket science, but until it breaks I don't care enough to know more...)
Functions [hide private]
raiseException(msg) source code
case_type(matcher, if_factory, if_matcher) source code
case_instance(matcher, if_wrapper, if_matcher) source code
Given a "constructor" (either a real constructor, or an annotated function), generate something that uniquely identifies that (the class for real constructors, and the embedded function for the output from the factories).
source code
matcher_type(matcher, fail=True) source code
Rewrite a map whose keys are matchers to use canonical_matcher_type.
source code
matcher_instance(matcher) source code
relations(base) source code
is_child(child, base, fail=True) source code
add_child(base, child) source code
add_children(base, *children) source code
Variables [hide private]
  _Matcher = ABCMeta('_Matcher', (object,), {})
ABC used to identify matchers.
  _FactoryMatcher = ABCMeta('_FactoryMatcher', (object,), {})
ABC used to identify factory matchers (have a property factory that identifies the matcher they generate).
Variables Details [hide private]


ABC used to identify matchers.

Note that graph traversal assumes subclasses are hashable and iterable.

ABCMeta('_Matcher', (object,), {})