parameters: (self, rule)
return_statement: return re.compile('^%s$'%out)
docstring: Return a regular expression with named groups for each wildcard.
docstring_summary: Return a regular expression with named groups for each wildcard.
docstring_tokens: Return a regular expression with named groups for each wildcard .
function: def _compile_pattern(self, rule):
          ''' Return a regular expression with named groups for each wildcard. '''
          out = ''
          for i, part in enumerate(self.syntax.split(rule)):
              if i%3 == 0:   out += re.escape(part.replace('\\:',':'))
              elif i%3 == 1: out += '(?P<%s>' % part if part else '(?:'
              else:          out += '%s)' % (part or '[^/]+')
          return re.compile('^%s$'%out)
function_tokens: def _compile_pattern ( self , rule ) : out = '' for i , part in enumerate ( self . syntax . split ( rule ) ) : if i % 3 == 0 : out += re . escape ( part . replace ( '\\:' , ':' ) ) elif i % 3 == 1 : out += '(?P<%s>' % part if part else '(?:' else : out += '%s)' % ( part or '[^/]+' ) return re . compile ( '^%s$' % out )