code: def format_str(self):
          ''' Return a format string with named fields. '''
          if self.static:
              return self.route.replace('%','%%')
          out, i = '', 0
          for token, value in self.tokens():
              if token == 'TXT': out += value.replace('%','%%')
              elif token == 'ANON': out += '%%(anon%d)s' % i; i+=1
              elif token == 'VAR': out += '%%(%s)s' % value[1]
          return ouf format_str(self):
          ''' Return a format string with named fields. '''
          if self.static:
              return self.route.replace('%','%%')
          out, i = '', 0
          for token, value in self.tokens():
              if token == 'TXT': out += value.replace('%','%%')
              elif token == 'ANON': out += '%%(anon%d)s' % i; i+=1
              elif token == 'VAR': out += '%%(%s)s' % value[1]
          return out
docs: Return a format string with named fields.