Internals¶
This section of the documentation descibes the internal code objects of Reg. The information included here is of interest only if you are thinking of contributing to Reg.
-
class
reg.predicate.
PredicateRegistry
(*predicates)¶ -
key
(**kw)¶ Construct a dispatch key from the arguments of a generic function.
Parameters: kw – a dictionary with the arguments passed to a generic function. Returns: a tuple, to be used as a key for dispatching.
-
key_dict_to_predicate_key
(d)¶ Construct a dispatch key from predicate values.
Uses
name
anddefault
attributes of predicates to construct the dispatch key.Parameters: d – dictionary mapping predicate names to predicate values. If a predicate is missing from d
, its default expected value is used.Returns: a tuple, to be used as a key for dispatching.
-