AmbiguousDef

class AmbiguousDef[source]

Determine whether expanded definitions are consistent.

Methods

AmbiguousDef.__init__()

AmbiguousDef.add_def(def_tag, def_expand_group)

Adds a definition to this ambiguous definition.

AmbiguousDef.get_definition_string()

AmbiguousDef.resolve_definition()

Try to resolve the definition based on the information available.

Attributes

AmbiguousDef.__init__()[source]
AmbiguousDef.add_def(def_tag, def_expand_group)[source]

Adds a definition to this ambiguous definition.

Parameters:
  • def_tag (HedTag) – The Def-expand tag representing this definition.

  • def_expand_group (HedGroup) – The Definition group including the tag and contents.

Raises:

ValueError – if this group could not match any of the other possible matches.

AmbiguousDef.get_definition_string()[source]
AmbiguousDef.resolve_definition()[source]

Try to resolve the definition based on the information available.

Returns: boolean - True if successfully resolved and False if it can’t be resolved from information available.

Raises: ValueError - If the actual_contents conflict.

If the definition has already been resolved, this rechecks based on the information.