def _isrecursive(pattern): if isinstance(pattern, binary_type): return pattern == b'**' else: return pattern == '**'