Commits

Brodie Rao  committed 37ce7eb

Shorten doctest

  • Participants
  • Parent commits 0e23976

Comments (0)

Files changed (1)

 def _match(pattern, s):
     """Match pattern or return False if invalid.
 
-    >>> bool(_match('foo.*', 'foobar'))
-    True
-    >>> _match('***', 'foobar')
-    False
+    >>> [bool(_match(r, 'foobar')) for r in ('foo.*', '***')]
+    [True, False]
     """
     try:
         return re.match(pattern, s)