In "Introduction to Algorithms: 3rd Edition" there is Theorem 34.2, which states
$P = \{ L \mid L \text{ is accepted by a polynomial-time algorithm} \}$
"Accepted in polynomial-time" is defined by:
$L$ is accepted in polynomial time by an algorithm $A$ if it is accepted by $A$ and if in addition there exists a constant $k$ such that for any length-n string $x\in L$, algorithm $A$ accepts $x$ in time $O(n^k)$.
"Accepted" is defined by:
The language accepted by an algorithm $A$ is the set of strings $L = \{ x \in \{0,1\}^* \mid A(x) = 1 \}$, that is, the set of strings that the algorithm accepts.
But what if we take $k = 0$, and algorithm $A(\cdot) = 1$, which just returns 1 for everything? Wouldn't that mean, that $P$ is just class of all languages?