Unit.
matches
(expr, repl_dict={}, old=False)¶Helper method for match() that looks for a match between Wild symbols in self and expressions in expr.
Examples
>>> from sympy import symbols, Wild, Basic
>>> a, b, c = symbols('a b c')
>>> x = Wild('x')
>>> Basic(a + x, x).matches(Basic(a + b, c)) is None
True
>>> Basic(a + x, x).matches(Basic(a + b + c, b + c))
{x_: b + c}