Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ddb893b2
Commit
ddb893b2
authored
Oct 06, 2013
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#19069: use imperative mood in float object docstrings. Patch by Marco Buttu.
parent
dfc459ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
Objects/floatobject.c
Objects/floatobject.c
+11
-11
No files found.
Objects/floatobject.c
View file @
ddb893b2
...
@@ -1503,9 +1503,9 @@ error:
...
@@ -1503,9 +1503,9 @@ error:
PyDoc_STRVAR
(
float_as_integer_ratio_doc
,
PyDoc_STRVAR
(
float_as_integer_ratio_doc
,
"float.as_integer_ratio() -> (int, int)
\n
"
"float.as_integer_ratio() -> (int, int)
\n
"
"
\n
"
"
\n
"
"Return
s
a pair of integers, whose ratio is exactly equal to the original
\n
"
"Return a pair of integers, whose ratio is exactly equal to the original
\n
"
"float and with a positive denominator.
\n
"
"float and with a positive denominator.
\n
"
"Raise
s
OverflowError on infinities and a ValueError on NaNs.
\n
"
"Raise OverflowError on infinities and a ValueError on NaNs.
\n
"
"
\n
"
"
\n
"
">>> (10.0).as_integer_ratio()
\n
"
">>> (10.0).as_integer_ratio()
\n
"
"(10, 1)
\n
"
"(10, 1)
\n
"
...
@@ -1692,7 +1692,7 @@ PyDoc_STRVAR(float_setformat_doc,
...
@@ -1692,7 +1692,7 @@ PyDoc_STRVAR(float_setformat_doc,
"'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be
\n
"
"'IEEE, big-endian' or 'IEEE, little-endian', and in addition can only be
\n
"
"one of the latter two if it appears to match the underlying C reality.
\n
"
"one of the latter two if it appears to match the underlying C reality.
\n
"
"
\n
"
"
\n
"
"Override
s
the automatic determination of C-level floating point type.
\n
"
"Override the automatic determination of C-level floating point type.
\n
"
"This affects how floats are converted to and from binary strings."
);
"This affects how floats are converted to and from binary strings."
);
static
PyObject
*
static
PyObject
*
...
@@ -1731,12 +1731,12 @@ PyDoc_STRVAR(float__format__doc,
...
@@ -1731,12 +1731,12 @@ PyDoc_STRVAR(float__format__doc,
static
PyMethodDef
float_methods
[]
=
{
static
PyMethodDef
float_methods
[]
=
{
{
"conjugate"
,
(
PyCFunction
)
float_float
,
METH_NOARGS
,
{
"conjugate"
,
(
PyCFunction
)
float_float
,
METH_NOARGS
,
"Return
s
self, the complex conjugate of any float."
},
"Return self, the complex conjugate of any float."
},
{
"__trunc__"
,
(
PyCFunction
)
float_trunc
,
METH_NOARGS
,
{
"__trunc__"
,
(
PyCFunction
)
float_trunc
,
METH_NOARGS
,
"Return
s
the Integral closest to x between 0 and x."
},
"Return the Integral closest to x between 0 and x."
},
{
"__round__"
,
(
PyCFunction
)
float_round
,
METH_VARARGS
,
{
"__round__"
,
(
PyCFunction
)
float_round
,
METH_VARARGS
,
"Return
s
the Integral closest to x, rounding half toward even.
\n
"
"Return the Integral closest to x, rounding half toward even.
\n
"
"When an argument is passed, work
s
like built-in round(x, ndigits)."
},
"When an argument is passed, work like built-in round(x, ndigits)."
},
{
"as_integer_ratio"
,
(
PyCFunction
)
float_as_integer_ratio
,
METH_NOARGS
,
{
"as_integer_ratio"
,
(
PyCFunction
)
float_as_integer_ratio
,
METH_NOARGS
,
float_as_integer_ratio_doc
},
float_as_integer_ratio_doc
},
{
"fromhex"
,
(
PyCFunction
)
float_fromhex
,
{
"fromhex"
,
(
PyCFunction
)
float_fromhex
,
...
@@ -1744,14 +1744,14 @@ static PyMethodDef float_methods[] = {
...
@@ -1744,14 +1744,14 @@ static PyMethodDef float_methods[] = {
{
"hex"
,
(
PyCFunction
)
float_hex
,
{
"hex"
,
(
PyCFunction
)
float_hex
,
METH_NOARGS
,
float_hex_doc
},
METH_NOARGS
,
float_hex_doc
},
{
"is_integer"
,
(
PyCFunction
)
float_is_integer
,
METH_NOARGS
,
{
"is_integer"
,
(
PyCFunction
)
float_is_integer
,
METH_NOARGS
,
"Return
s
True if the float is an integer."
},
"Return True if the float is an integer."
},
#if 0
#if 0
{"is_inf", (PyCFunction)float_is_inf, METH_NOARGS,
{"is_inf", (PyCFunction)float_is_inf, METH_NOARGS,
"Return
s
True if the float is positive or negative infinite."},
"Return True if the float is positive or negative infinite."},
{"is_finite", (PyCFunction)float_is_finite, METH_NOARGS,
{"is_finite", (PyCFunction)float_is_finite, METH_NOARGS,
"Return
s
True if the float is finite, neither infinite nor NaN."},
"Return True if the float is finite, neither infinite nor NaN."},
{"is_nan", (PyCFunction)float_is_nan, METH_NOARGS,
{"is_nan", (PyCFunction)float_is_nan, METH_NOARGS,
"Return
s
True if the float is not a number (NaN)."},
"Return True if the float is not a number (NaN)."},
#endif
#endif
{
"__getnewargs__"
,
(
PyCFunction
)
float_getnewargs
,
METH_NOARGS
},
{
"__getnewargs__"
,
(
PyCFunction
)
float_getnewargs
,
METH_NOARGS
},
{
"__getformat__"
,
(
PyCFunction
)
float_getformat
,
{
"__getformat__"
,
(
PyCFunction
)
float_getformat
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment