ExpressionAnd

class ExpressionAnd(token, left=None, right=None)[source]

Methods

ExpressionAnd.__init__(token[, left, right])

ExpressionAnd.handle_expr(hed_group[, exact])

Handles parsing the given expression, recursively down the list as needed.

ExpressionAnd.merge_and_groups(groups1, groups2)

Finds any shared results

Attributes

ExpressionAnd.__init__(token, left=None, right=None)
ExpressionAnd.handle_expr(hed_group, exact=False)[source]

Handles parsing the given expression, recursively down the list as needed.

BaseClass implementation is search terms.

Parameters:
  • hed_group (HedGroup) – The object to search

  • exact (bool) – If True, we are only looking for groups containing this term directly, not descendants.

static ExpressionAnd.merge_and_groups(groups1, groups2)[source]

Finds any shared results

Parameters:
  • groups1 (list) – a list of search results

  • groups2 (list) – a list of search results

Returns:

groups in both lists narrowed down results to where none of the tags overlap

Return type:

combined_groups(list)