OK, that makes sense.
The reason I'm interested (among others) is that I'm trying to implement a multizoom function in Python that takes a list of rules to match against, and zooming to those terms that match at least one of the rules.
I am running into a problem that matches() maybe isn't as clever as I want it to be. For example,
$x A??$.matches($x y$)
$x A??$.matches($x y z$)
returns True and False, respectively, rather than both True. Also, the order matters, so that
$x A??$.matches($y x$)
returns False. Is this the desired behavior?
If matches isn't clever enough, is there some other Python routine that can do a more sophisticated pattern matching?
EDIT: I have just discovered the .compare routine in ExNode. Maybe this will help...