What is the type of the compiled regular expression in python?
In particular, I want to evaluate
isinstance(re.compile(\'\'), ???)
It is possible to compare a compiled regular expression with 're._pattern_type'
import re pattern = r'aa' compiled_re = re.compile(pattern) print isinstance(compiled_re, re._pattern_type) >>True
Gives True, at least in version 2.7