Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Style fixes suggested by serhiy-storchaka
  • Loading branch information
MojoVampire committed Aug 1, 2019
commit 663add0a543da5e9ba286a69e3d086684218933b
13 changes: 3 additions & 10 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1723,21 +1723,14 @@ notimplemented_bool(PyObject *v)
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"NotImplemented should not be used in a boolean context",
1) < 0)
{
return -1;
Comment thread
MojoVampire marked this conversation as resolved.
Outdated
}
return 1;
}

static PyNumberMethods notimplemented_as_number = {
0, /* nb_add */
0, /* nb_subtract */
0, /* nb_multiply */
0, /* nb_remainder */
0, /* nb_divmod */
0, /* nb_power */
0, /* nb_negative */
0, /* nb_positive */
0, /* nb_absolute */
(inquiry)notimplemented_bool, /* nb_bool */
.nb_bool = notimplemented_bool,
};

PyTypeObject _PyNotImplemented_Type = {
Expand Down