finesse.symbols.Symbol.all

Symbol.all(predicate, memo=None)[source]

Returns all the symbols that are present in this expression which satisify the predicate.

Parameters
predicatecallable

Method which takes in an argument and returns True if it matches.

Examples

To select all Constant`s and `Variable`s from an expression `y: >>> y.all(lambda a: isinstance(a, (Constant, Variable)))