summaryrefslogtreecommitdiffstats
path: root/pattern.py
diff options
context:
space:
mode:
Diffstat (limited to 'pattern.py')
-rw-r--r--pattern.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pattern.py b/pattern.py
index 7ff95d8..6b391ad 100644
--- a/pattern.py
+++ b/pattern.py
@@ -31,6 +31,12 @@ class Pattern:
if len(self.items) > 0: return True
return False
+ def full(self):
+ """
+ Returns True if this pattern matches *all* strings.
+ """
+ return self.invert and len(self.items) == 0
+
def singular(self):
"""
Returns True if this pattern will match *exactly one* string