def __init__(self, format):
        # convert strptime format string to regular expression
        format = " ".join(re.split(r"(?:\s|%t|%n)+", format))
        pattern = []

        try:
            for spec in re.findall(r"%\w|%%|.", format):
                if spec[0] == "%":
                    spec = SPEC[spec]
                pattern.append(spec)
        except __HOLE__:
            raise ValueError("unknown specificer:{}".format(spec))

        self.pattern = re.compile(r"(?i)" + "".join(pattern))
dataset/ETHPy150Open PressLabs/gitfs/gitfs/utils/strptime.py/TimeParser.__init__