We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeca436 commit 650b666Copy full SHA for 650b666
Objects/floatobject.c
@@ -1689,7 +1689,7 @@ static PyObject *
1689
float___getformat___impl(PyTypeObject *type, const char *typestr)
1690
/*[clinic end generated code: output=2bfb987228cc9628 input=0ae1ba35d192f704]*/
1691
{
1692
- if (strcmp(typestr, "double") != 0 || strcmp(typestr, "float") != 0) {
+ if (strcmp(typestr, "double") != 0 && strcmp(typestr, "float") != 0) {
1693
PyErr_SetString(PyExc_ValueError,
1694
"__getformat__() argument 1 must be "
1695
"'double' or 'float'");
0 commit comments