pyebnf/compiler.py
def _find_directives(self, pred):
    """Finds all directives with a certain name, or that passes a predicate."""
    if isinstance(pred, str):
      return [d for d in self.directives if d.name == pred]
    else:
      return [d for d in self.directives if pred(d)]
def _find_directives(self, pred):
    """Finds all directives with a certain name, or that passes a predicate."""
    if isinstance(pred, str):
      return [d for d in self.directives if d.name == pred]
    else:
      return [d for d in self.directives if pred(d)]
def _find_directives ( self , pred ) : if isinstance ( pred , str ) : return [ d for d in self . directives if d . name == pred ] else : return [ d for d in self . directives if pred ( d ) ]
Finds all directives with a certain name, or that passes a predicate.
Finds all directives with a certain name or that passes a predicate .