Hi everyone,

For a part of my project I tried using pattern matching with .match and
Wild, as described here
http://docs.sympy.org/0.7.0/tutorial.html#pattern-matching, to match some
instances of a class I am working on, however it does not currently work as
I'd hoped in trying to match objects of CG, which subclasses Expr. For
example, I'd like to be able to get
>>> x = Wild('x')
>>> (CG(1,1,1,1,1,1)).match(CG(x,1,1,1,1,1)
{x: 1}
However it currently gives None. I assume I need to implement some function
(maybe matches or _matches), but if someone knows a bit more about pattern
matching that could advise me here, I'd appreciate it. Thanks.

Sean

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to