(If the answer is for me - pity it lacks any context.)
On Thu, Mar 25, 2021 at 10:51:06PM -0000, firstname.lastname@example.org wrote:
This follows the example of str.startswith/str.endswith, but yes, it could be any iterable.
It could but currently cannot. The code checks for ``tuple`` literally:
pats = pat if isinstance(pat, tuple) else (pat,)
The test should be inverted - check for string, not for iterator/iterable:
pats = (pat,) if isinstance(pat, string) else pat # Assume ``pat`` is an iterable