Holdings

class authorityspoke.holdings.Holding(rule, rule_valid=True, decided=True, exclusive=False, generic=False, anchors=<factory>)

An Opinion’s announcement that it posits or rejects a legal Rule.

Note that if an opinion merely says the court is not deciding whether a Rule is valid, there is no Holding, and no Rule object should be created. Deciding not to decide a Rule’s validity is not the same thing as deciding that the Rule is undecided.

Parameters
  • rule (Rule) – a statement of a legal doctrine about a Procedure for litigation.

  • rule_valid (bool) – True means the Rule is asserted to be valid (or useable by a court in litigation). False means it’s asserted to be invalid.

  • decided (bool) – False means that it should be deemed undecided whether the Rule is valid, and thus can have the effect of overruling prior holdings finding the Rule to be either valid or invalid. Seemingly, decided=False should render the rule_valid flag irrelevant.

  • exclusive (bool) – if True, the stated rule is asserted to be the only way to establish the output that is the output of the rule.

  • generic (bool) – if True, indicates that the specific attributes of this holding are irrelevant in the context of a different holding that is referencing this holding.

property procedure

Get Procedure from Rule.

property despite

Get Factors that specifically don’t preclude application of the Holding.

property inputs

Get inputs from Procedure.

property outputs

Get outputs from Procedure.

property enactments

Get Enactments required to apply the Holding.

property enactments_despite

Get Enactments that specifically don’t preclude application of the Holding.

property context_factors

Call Procedure’s context_factors() method.

Return type

Tuple

Returns

context_factors from self’s Procedure

property generic_factors_by_name

Get Factors that can be replaced without changing selfs meaning.

Return type

Dict[str, Factor]

Returns

generic Factors from self’s Procedure

property mandatory

Whether court “MUST” apply holding when it is applicable.

Return type

bool

property universal

Whether holding is applicable in “ALL” cases where inputs are present.

Return type

bool

add_if_not_exclusive(other)

Show how first Holding triggers second, assumed not to be “exclusive” way to reach result.

Return type

Optional[Holding]

add_holding(other)

Show how first Holding triggers the second.

Return type

Optional[Holding]

explanations_contradiction(other, context=None)

Find context matches that would result in a contradiction with other.

Works by testing whether self would imply other if other had an opposite value for rule_valid.

This method takes three main paths depending on whether the holdings self and other assert that rules are decided or undecided.

A decided Rule can never contradict a previous statement that any Rule was undecided.

If rule A implies rule B, then a holding that B is undecided contradicts a prior Rule deciding that rule A is valid or invalid.

Parameters

other (Factor) – The Factor to be compared to self. Unlike with contradicts(), this method cannot be called with an Opinion for other.

Return type

Iterator[Explanation]

Returns

a generator yielding ContextRegisters that cause a contradiction.

__ge__(other)

Call implies() as an alias.

Return type

bool

Returns

bool indicating whether self implies other

implies(other, context=None)

Test for implication.

See Procedure.implies_all_to_all() and Procedure.implies_all_to_some() for explanations of how inputs, outputs, and despite Factors affect implication.

Parameters

other (Optional[Comparable]) – A Holding to compare to self, or a Rule to convert into such a Holding and then compare

Return type

bool

Returns

whether self implies other

explanations_implication(other, context=None)

Yield contexts that would cause self and other to have same meaning.

Return type

Iterator[ContextRegister]

implied_by(other, context=None)

Test if other implies self.

This function is for handling implication checks for classes that don’t know the structure of the Holding class, such as Fact and Rule.

Return type

bool

__len__()

Count generic Factors needed as context for this Holding.

Returns

the number of generic Factors needed for self’s Procedure.

property inferred_from_exclusive

Yield Holdings that can be inferred from the “exclusive” flag.

The generator will be empty if self.exclusive is False.

Return type

List[Holding]

explanations_same_meaning(other, context=None)

Yield contexts that would cause self and other to have same meaning.

Return type

Iterator[ContextRegister]

factor_anchors()

Get text passages where a Holding is linked to self.

Parameters

holding – a holding to find anchors for, which must be in holdings.

Return type

List[TextQuoteSelector]

Returns

a list with the text of each passage that anchors the Holding

negated()

Get new copy of self with an opposite value for rule_valid.

new_context(changes)

Create new Holding, replacing keys of changes with values.

Return type

Factor

Returns

a version of self with the new context.

property nonexclusive_holdings

Yield all Holdings with exclusive is False implied by self.

Return type

HoldingGroup

union(other, context=None)

Infer a Holding from all inputs and outputs of self and other, in context.

Return type

Optional[Holding]

__or__(other)

Infer a Holding from all inputs and outputs of self and other.

Return type

Optional[Holding]

own_attributes()

Return attributes of self that aren’t inherited from another class.

Used for getting parameters to pass to __init__() when generating a new object.

Return type

Dict[str, Any]

__str__()

Return str(self).