Skip to content

Commit 3838614

Browse files
committed
python#19069: use imperative mood in float object docstrings. Patch by Marco Buttu.
1 parent eb05316 commit 3838614

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎Objects/floatobject.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,9 +1783,9 @@ float_as_integer_ratio(PyObject *v, PyObject *unused)
17831783
PyDoc_STRVAR(float_as_integer_ratio_doc,
17841784
"float.as_integer_ratio() -> (int, int)\n"
17851785
"\n"
1786-
"Returns a pair of integers, whose ratio is exactly equal to the original\n"
1786+
"Return a pair of integers, whose ratio is exactly equal to the original\n"
17871787
"float and with a positive denominator.\n"
1788-
"Raises OverflowError on infinities and a ValueError on NaNs.\n"
1788+
"Raise OverflowError on infinities and a ValueError on NaNs.\n"
17891789
"\n"
17901790
">>> (10.0).as_integer_ratio()\n"
17911791
"(10, 1)\n"
@@ -1970,7 +1970,7 @@ PyDoc_STRVAR(float_setformat_doc,
19701970
"'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be\n"
19711971
"one of the latter two if it appears to match the underlying C reality.\n"
19721972
"\n"
1973-
"Overrides the automatic determination of C-level floating point type.\n"
1973+
"Override the automatic determination of C-level floating point type.\n"
19741974
"This affects how floats are converted to and from binary strings.");
19751975

19761976
static PyObject *
@@ -2017,24 +2017,24 @@ PyDoc_STRVAR(float__format__doc,
20172017

20182018
static PyMethodDef float_methods[] = {
20192019
{"conjugate", (PyCFunction)float_float, METH_NOARGS,
2020-
"Returns self, the complex conjugate of any float."},
2020+
"Return self, the complex conjugate of any float."},
20212021
{"__trunc__", (PyCFunction)float_trunc, METH_NOARGS,
2022-
"Returns the Integral closest to x between 0 and x."},
2022+
"Return the Integral closest to x between 0 and x."},
20232023
{"as_integer_ratio", (PyCFunction)float_as_integer_ratio, METH_NOARGS,
20242024
float_as_integer_ratio_doc},
20252025
{"fromhex", (PyCFunction)float_fromhex,
20262026
METH_O|METH_CLASS, float_fromhex_doc},
20272027
{"hex", (PyCFunction)float_hex,
20282028
METH_NOARGS, float_hex_doc},
20292029
{"is_integer", (PyCFunction)float_is_integer, METH_NOARGS,
2030-
"Returns True if the float is an integer."},
2030+
"Return True if the float is an integer."},
20312031
#if 0
20322032
{"is_inf", (PyCFunction)float_is_inf, METH_NOARGS,
2033-
"Returns True if the float is positive or negative infinite."},
2033+
"Return True if the float is positive or negative infinite."},
20342034
{"is_finite", (PyCFunction)float_is_finite, METH_NOARGS,
2035-
"Returns True if the float is finite, neither infinite nor NaN."},
2035+
"Return True if the float is finite, neither infinite nor NaN."},
20362036
{"is_nan", (PyCFunction)float_is_nan, METH_NOARGS,
2037-
"Returns True if the float is not a number (NaN)."},
2037+
"Return True if the float is not a number (NaN)."},
20382038
#endif
20392039
{"__getnewargs__", (PyCFunction)float_getnewargs, METH_NOARGS},
20402040
{"__getformat__", (PyCFunction)float_getformat,

0 commit comments

Comments
 (0)