def parse_kwargs(parser):
 name = parser.stream.expect('name').value
 parser.stream.expect('assign')
 if parser.stream.current.test('string'):
  value = parser.parse_expression()
 else:
  value = nodes.Const(next(parser.stream).value)
 return (name, value)

def parse_kwargs ( parser ) : name = parser . stream . expect ( 'name' ) . value parser . stream . expect ( 'assign' ) if parser . stream . current . test ( 'string' ) : value = parser . parse_expression ( ) else : value = nodes . Const ( next ( parser . stream ) . value ) return ( name , value )
parses keyword arguments in tags .