Holdings

class authorityspoke.holdings.Holding(rule, rule_valid=True, decided=True, selectors=(), name=None, procedure=None, outputs=None, inputs=None, despite=None, enactments=None, enactments_despite=None, mandatory=False, universal=False, generic=False)

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.

  • selector – A text selector for the whole Holding, not for any individual Factor. Often selects text used to indicate whether the Rule is mandatory, universal, valid, or decided, or shows the exclusive way to reach the outputs.

property context_factors

Call Procedure’s context_factors() method.

Return type

Tuple

Returns

context_factors from self’s Procedure

property generic_factors

Get Factors that can be replaced without changing selfs meaning.

Return type

List[Optional[Factor]]

Returns

generic Factors from self’s Procedure

explain_contradiction(other, context=None)

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

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[ContextRegister]

Returns

a generator yielding ContextRegisters that cause a contradiction.

contradicts(other, context=None)

Test if self implies() other negated().

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.

Return type

bool

Returns

whether self contradicts other.

explain_implication(other, context=None)

Generate ContextRegisters that cause self to imply other.

If self is absent, then generate a ContextRegister from other’s point of view and then swap the keys and values.

Return type

Iterator[ContextRegister]

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 (Union[Holding, Rule]) – 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

__ge__(other)

Call implies() as an alias.

Return type

bool

Returns

bool indicating whether self implies other

__len__()

Count generic Factors needed as context for this Holding.

Returns

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

explain_same_meaning(other, context=None)

Generate ways to match contexts of self and other so they mean the same.

Return type

Iterator[ContextRegister]

means(other, context=None)

Test whether other has the same meaning as self.

Return type

bool

Returns

whether other is a Holding with the same meaning as self.

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.

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).