(parser, token)
return ParameterListNode(nodelist, separator, append)
r"""Gather a list of parameter declarations and join them with ','.

  Gathers all 'parameter' nodes until the 'end_parameter_list' tag and joins
  them together with a ', ' separator. Extra white space between nodes is
  removed, but other text is left intact, joined to the end of the preceding
  parameter node. Blank parameters are omitted from the list.

  Usage:
    foo({% parameter_list [separator [append]] %}{% for p in m.parameters %}
        {% parameter %}
          {{ p.type }} {{ p.name }}
        {% end_parameter %}
        {% endfor %}
        {% end_parameter_list %})

    separater: may contain \n, \t, \r, and \b (for space)
    append: indicates that this list appends another. If there are any
    parameters in the list, a leading separator will be emitted. This
    effectively 'appends' this parameter_list to any previous output.

  Args:
    parser: (parser) the Django parser context.
    token: (django.template.Token) the token holding this tag

  Returns:
    a ParameterListNode
r"""Gather a list of parameter declarations and join them with ','.
r Gather a list of parameter declarations and join them with .
def DoParameterList(parser, token):
  r"""Gather a list of parameter declarations and join them with ','.

  Gathers all 'parameter' nodes until the 'end_parameter_list' tag and joins
  them together with a ', ' separator. Extra white space between nodes is
  removed, but other text is left intact, joined to the end of the preceding
  parameter node. Blank parameters are omitted from the list.

  Usage:
    foo({% parameter_list [separator [append]] %}{% for p in m.parameters %}
        {% parameter %}
          {{ p.type }} {{ p.name }}
        {% end_parameter %}
        {% endfor %}
        {% end_parameter_list %})

    separater: may contain \n, \t, \r, and \b (for space)
    append: indicates that this list appends another. If there are any
    parameters in the list, a leading separator will be emitted. This
    effectively 'appends' this parameter_list to any previous output.

  Args:
    parser: (parser) the Django parser context.
    token: (django.template.Token) the token holding this tag

  Returns:
    a ParameterListNode
  """
  separator = ', '
  append = False
  args = token.split_contents()
  if len(args) > 1:
    separator = args[1]
    separator = separator.replace(r'\n', '\n')
    separator = separator.replace(r'\r', '\r')
    separator = separator.replace(r'\t', '\t')
    separator = separator.replace(r'\b', ' ')
  if len(args) > 2:
    if args[2] == 'append':
      append = True
  if len(args) > 3:
    raise django_template.TemplateSyntaxError(
        'parameter_list expects at most two arguments')

  nodelist = parser.parse(('end_parameter_list',))
  parser.delete_first_token()
  return ParameterListNode(nodelist, separator, append)
def DoParameterList ( parser , token ) : separator = ', ' append = False args = token . split_contents ( ) if len ( args ) > 1 : separator = args [ 1 ] separator = separator . replace ( r'\n' , '\n' ) separator = separator . replace ( r'\r' , '\r' ) separator = separator . replace ( r'\t' , '\t' ) separator = separator . replace ( r'\b' , ' ' ) if len ( args ) > 2 : if args [ 2 ] == 'append' : append = True if len ( args ) > 3 : raise django_template . TemplateSyntaxError ( 'parameter_list expects at most two arguments' ) nodelist = parser . parse ( ( 'end_parameter_list' , ) ) parser . delete_first_token ( ) return ParameterListNode ( nodelist , separator , append )