# Why does a meromorphic function in the (extended) complex plane have finitely many poles?

Let $f$ be meromorphic in $\mathbb{C} \cup \{\infty\}$. Why must $f$ have only finitely many poles?

Edit: Renamed question following the comments.

-
The title of the post asks a different question than the body and the question in the title is inaccurate: a meromorphic function in the complex plane MAY have infinitely many poles. The space $\mathbb C\cup\{\infty\}$ is usually called the extended complex plane or the Riemann sphere. – Did Oct 5 '11 at 9:12
As an explicit counterexample to the title question, consider $\frac{1}{2 - e^z}$. – Qiaochu Yuan Oct 5 '11 at 15:22

The set of poles is also closed, since its complement, the set of points at which $f$ is holomorphic, is open. (Any point where $f$ is holomorphic has a neighborhood restricted to which $f$ is holomorphic.)
Since $\mathbb C \cup \{\infty\}$ is compact, any discrete and closed subset is discrete and compact, hence finite.
(Note that the reasoning of the first two paragraphs applies to a meromorphic function on any open subset of the Riemann sphere. E.g. a meromorphic function on $\mathbb C$ can have infinitely many poles, but they must form a closed and discrete subset of $\mathbb C$, and hence there can only be finitely many in any given bounded subset, i.e. they must accumulate at $\infty$. A typical example is given by $f(z) = 1/\sin z$.)