def p_expr_stmt(p):
 if (len(p) == 2):
  p[0] = ast.Discard(p[1])
 else:
  p[0] = Assign(p[1], p[3])

def p_expr_stmt ( p ) : if ( len ( p ) == 2 ) : p [ 0 ] = ast . Discard ( p [ 1 ] ) else : p [ 0 ] = Assign ( p [ 1 ] , p [ 3 ] )
expr_stmt : testlist assign testlist | testlist .