Skip to content

Commit be7311b

Browse files
committed
document that float() accepts bytes-like objects
1 parent e4b22ad commit be7311b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Objects/clinic/floatobject.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Objects/floatobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,12 +1560,12 @@ float.__new__ as float_new
15601560
x: object(c_default="NULL") = 0
15611561
/
15621562
1563-
Convert a string or number to a floating-point number, if possible.
1563+
Convert a string, number, or bytes-like object to a float, if possible.
15641564
[clinic start generated code]*/
15651565

15661566
static PyObject *
15671567
float_new_impl(PyTypeObject *type, PyObject *x)
1568-
/*[clinic end generated code: output=ccf1e8dc460ba6ba input=55909f888aa0c8a6]*/
1568+
/*[clinic end generated code: output=ccf1e8dc460ba6ba input=27eb1f7c62226a39]*/
15691569
{
15701570
if (type != &PyFloat_Type) {
15711571
if (x == NULL) {

0 commit comments

Comments
 (0)