Skip to content

Commit 650b666

Browse files
committed
amend __getformat__
1 parent eeca436 commit 650b666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/floatobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ static PyObject *
16891689
float___getformat___impl(PyTypeObject *type, const char *typestr)
16901690
/*[clinic end generated code: output=2bfb987228cc9628 input=0ae1ba35d192f704]*/
16911691
{
1692-
if (strcmp(typestr, "double") != 0 || strcmp(typestr, "float") != 0) {
1692+
if (strcmp(typestr, "double") != 0 && strcmp(typestr, "float") != 0) {
16931693
PyErr_SetString(PyExc_ValueError,
16941694
"__getformat__() argument 1 must be "
16951695
"'double' or 'float'");

0 commit comments

Comments
 (0)