Mercurial > cpython-lru_cache-weakref
diff Objects/setobject.c @ 39536:8f5b9982beba
Completely get rid of PyClass and PyInstance.
(classobject.[ch] aren't empty yet because they also define PyMethod.)
This breaks lots of stuff, notably cPickle. But it's a step in the right
direction. I'll clean it up later.
(Also a few unrelated changes, e.g. T_NONE to define a "struct member"
that is always None, and simplification of __hash__ -- these are unfinished.)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Aug 2006 05:42:55 +0000 |
| parents | 654c380cf8b9 |
| children | d0b83c4630c0 |
line wrap: on
line diff
--- a/Objects/setobject.c Thu Aug 17 05:40:03 2006 +0000 +++ b/Objects/setobject.c Thu Aug 17 05:42:55 2006 +0000 @@ -718,13 +718,6 @@ return hash; } -static long -set_nohash(PyObject *self) -{ - PyErr_SetString(PyExc_TypeError, "set objects are unhashable"); - return -1; -} - /***** Set iterator type ***********************************************/ typedef struct { @@ -1813,7 +1806,7 @@ &set_as_number, /* tp_as_number */ &set_as_sequence, /* tp_as_sequence */ 0, /* tp_as_mapping */ - set_nohash, /* tp_hash */ + 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ PyObject_GenericGetAttr, /* tp_getattro */
