@@ -36,6 +36,21 @@ Number-theoretic and representation functions
3636 :class: `~numbers.Integral ` value.
3737
3838
39+ .. function :: comb(n, k)
40+
41+ Return the number of ways to choose *k * items from *n * items without repetition
42+ and without order.
43+
44+ Also called the binomial coefficient. It is mathematically equal to the expression
45+ ``n! / (k! (n - k)!) ``. It is equivalent to the coefficient of the *k *-th term in the
46+ polynomial expansion of the expression ``(1 + x) ** n ``.
47+
48+ Raises :exc: `TypeError ` if the arguments not integers.
49+ Raises :exc: `ValueError ` if the arguments are negative or if *k * > *n *.
50+
51+ .. versionadded :: 3.8
52+
53+
3954.. function :: copysign(x, y)
4055
4156 Return a float with the magnitude (absolute value) of *x * but the sign of
@@ -232,21 +247,6 @@ Number-theoretic and representation functions
232247 :meth: `x.__trunc__() <object.__trunc__> `.
233248
234249
235- .. function :: comb(n, k)
236-
237- Return the number of ways to choose *k * items from *n * items without repetition
238- and without order.
239-
240- Also called the binomial coefficient. It is mathematically equal to the expression
241- ``n! / (k! (n - k)!) ``. It is equivalent to the coefficient of the *k *-th term in the
242- polynomial expansion of the expression ``(1 + x) ** n ``.
243-
244- Raises :exc: `TypeError ` if the arguments not integers.
245- Raises :exc: `ValueError ` if the arguments are negative or if *k * > *n *.
246-
247- .. versionadded :: 3.8
248-
249-
250250Note that :func: `frexp ` and :func: `modf ` have a different call/return pattern
251251than their C equivalents: they take a single argument and return a pair of
252252values, rather than returning their second return value through an 'output
0 commit comments