I usually define command of the kind

\newcommand{\paren}[#1]{\left(#1\right)}


to make the use of parentheses more agile.
Now, if in the body of my document I do this

\begin{align}
z = \paren{y\\+z}
\end{align}


I get a long list of complaints on the last line of the align environment, while I would expect the same output as for the following code,

\begin{align}
z = \left(y\\+z\right)
\end{align}


Anybody can let me know how to this sort of parentheses commands robust over line breaks?

\documentclass{article}
\usepackage{amsmath}

\newcommand{\paren}[1]{\left(#1\right)}



\begin{document}


% This works, but I don't like it.
\begin{align}
z = \left(y\right.\\
\left.+z\right)
\end{align}

% This is lovely, but does not work.
%\begin{align}
%z = \paren{y\\+z}
%\end{align}

% No complaints, of course, if the line break is removed
\begin{align}
z = \paren{y+z}
\end{align}

\end{document}



Question: Modifying Local Within Function Changes Global Passed to Function in Python
Answer: Your quote says:


  If you want to simply access a global variable you just use its name. However to change its value you need to use the global keyword.


I would modify that to:


  If you want to simply access the object a global variable refers to, you just use its name. However to change what object it refers to, you need to use the global keyword.


Accessing a global object can include changing things about the object (such as appending a new object to an existing global list). However, if your function tried to do:

def app(mylist):
    mylist = mylist + [4]
    return mylist


which attempts to change the global mylist reference (by creating a new object and assigning the result to mylist), then you would need to use the global keyword.