class documentation
class NegatedPattern(BasePattern): (source)
Undocumented
Method | __init__ |
Initializer. |
Method | generate |
Generator yielding all matches for this pattern. |
Method | match |
Does this pattern exactly match a node? |
Method | match |
Does this pattern exactly match a sequence of nodes? |
Instance Variable | content |
Undocumented |
Inherited from BasePattern
:
Method | __new__ |
Constructor that prevents BasePattern from being instantiated. |
Method | __repr__ |
Undocumented |
Method | optimize |
A subclass can define this as a hook for optimizations. |
Class Variable | name |
Undocumented |
Class Variable | type |
Undocumented |
Property | type |
Get the type as a human-readable string. |
Initializer. The argument is either a pattern or None. If it is None, this only matches an empty sequence (effectively '$' in regex lingo). If it is not None, this matches whenever the argument pattern doesn't have any matches.
Does this pattern exactly match a node? Returns True if it matches, False if not. If results is not None, it must be a dict which will be updated with the nodes matching named subpatterns. Default implementation for non-wildcard patterns.