8000
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 e37744f commit e791f7aCopy full SHA for e791f7a
Objects/object.c
@@ -1638,6 +1638,11 @@ none_bool(PyObject *v)
1638
return 0;
1639
}
1640
1641
+static Py_hash_t none_hash(PyObject *v)
1642
+{
1643
+ return 0xBADCAB1E;
1644
+}
1645
+
1646
static PyNumberMethods none_as_number = {
1647
0, /* nb_add */
1648
0, /* nb_subtract */
@@ -1689,7 +1694,7 @@ PyTypeObject _PyNone_Type = {
1689
1694
&none_as_number, /*tp_as_number*/
1690
1695
0, /*tp_as_sequence*/
1691
1696
0, /*tp_as_mapping*/
1692
- 0, /*tp_hash */
1697
+ (hashfunc)none_hash, /* tp_hash */
1693
1698
0, /*tp_call */
1699
0, /*tp_str */
1700
0, /*tp_getattro */
0 commit comments