def parse(self):
        """Parse pattern list."""

        result = ['']
        negative = False

        p = util.norm_pattern(self.pattern, not self.unix, self.raw_chars)

        p = p.decode('latin-1') if self.is_bytes else p
        if is_negative(p, self.flags):
            negative = True
            p = p[1:]

        self.root(p, result)

        case_flag = 'i' if not self.case_sensitive else ''
        if util.PY36:
            pattern = (
                r'^(?!(?s%s:%s)$).*?$' if negative and not self.globstar_capture else r'^(?s%s:%s)$'
            ) % (case_flag, ''.join(result))
        else:
            pattern = (
                r'(?s%s)^(?!(?:%s)$).*?$' if negative and not self.globstar_capture else r'(?s%s)^(?:%s)$'
            ) % (case_flag, ''.join(result))

        if self.is_bytes:
            pattern = pattern.encode('latin-1')

        return pattern
def parse ( self ) : result = [ '' ] negative = False p = util . norm_pattern ( self . pattern , not self . unix , self . raw_chars ) p = p . decode ( 'latin-1' ) if self . is_bytes else p if is_negative ( p , self . flags ) : negative = True p = p [ 1 : ] self . root ( p , result ) case_flag = 'i' if not self . case_sensitive else '' if util . PY36 : pattern = ( r'^(?!(?s%s:%s)$).*?$' if negative and not self . globstar_capture else r'^(?s%s:%s)$' ) % ( case_flag , '' . join ( result ) ) else : pattern = ( r'(?s%s)^(?!(?:%s)$).*?$' if negative and not self . globstar_capture else r'(?s%s)^(?:%s)$' ) % ( case_flag , '' . join ( result ) ) if self . is_bytes : pattern = pattern . encode ( 'latin-1' ) return pattern
Parse pattern list.