Skip to content

Commit 63c9453

Browse files
committed
Mechanical fiddling to make this easier to work with in my editor.
Repaired the ldexp docstring (said the name of the func was "ldexp_doc").
1 parent f894f6f commit 63c9453

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

Modules/mathmodule.c

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ FUNC1(tan, tan,
158158
FUNC1(tanh, tanh,
159159
"tanh(x)\n\nReturn the hyperbolic tangent of x.")
160160

161-
162161
static PyObject *
163162
math_frexp(PyObject *self, PyObject *args)
164163
{
@@ -176,12 +175,11 @@ math_frexp(PyObject *self, PyObject *args)
176175
}
177176

178177
static char math_frexp_doc [] =
179-
"frexp(x)\n\
180-
\n\
181-
Return the mantissa and exponent of x, as pair (m, e).\n\
182-
m is a float and e is an int, such that x = m * 2.**e.\n\
183-
If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0.";
184-
178+
"frexp(x)\n"
179+
"\n"
180+
"Return the mantissa and exponent of x, as pair (m, e).\n"
181+
"m is a float and e is an int, such that x = m * 2.**e.\n"
182+
"If x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0.";
185183

186184
static PyObject *
187185
math_ldexp(PyObject *self, PyObject *args)
@@ -202,10 +200,7 @@ math_ldexp(PyObject *self, PyObject *args)
202200
}
203201

204202
static char math_ldexp_doc [] =
205-
"ldexp_doc(x, i)\n\
206-
\n\
207-
Return x * (2**i).";
208-
203+
"ldexp(x, i) -> x * (2**i)";
209204

210205
static PyObject *
211206
math_modf(PyObject *self, PyObject *args)
@@ -231,11 +226,10 @@ math_modf(PyObject *self, PyObject *args)
231226
}
232227

233228
static char math_modf_doc [] =
234-
"modf(x)\n\
235-
\n\
236-
Return the fractional and integer parts of x. Both results carry the sign\n\
237-
of x. The integer part is returned as a real.";
238-
229+
"modf(x)\n"
230+
"\n"
231+
"Return the fractional and integer parts of x. Both results carry the sign\n"
232+
"of x. The integer part is returned as a real.";
239233

240234
static PyMethodDef math_methods[] = {
241235
{"acos", math_acos, METH_VARARGS, math_acos_doc},
@@ -266,8 +260,8 @@ static PyMethodDef math_methods[] = {
266260

267261

268262
static char module_doc [] =
269-
"This module is always available. It provides access to the\n\
270-
mathematical functions defined by the C standard.";
263+
"This module is always available. It provides access to the\n"
264+
"mathematical functions defined by the C standard.";
271265

272266
DL_EXPORT(void)
273267
initmath(void)

0 commit comments

Comments
 (0)