summaryrefslogtreecommitdiffstats
path: root/Include/setobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/setobject.h')
-rw-r--r--Include/setobject.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/setobject.h b/Include/setobject.h
index abbd847..cc2d683 100644
--- a/Include/setobject.h
+++ b/Include/setobject.h
@@ -16,6 +16,14 @@ typedef struct {
PyObject *data;
long hash; /* only used by frozenset objects */
PyObject *weakreflist; /* List of weak references */
+
+ /* Invariants:
+ * data is a dictionary whose values are all True.
+ * data points to the same dict for the whole life of the set.
+ * For frozensets only:
+ * data is immutable.
+ * hash is the hash of the frozenset or -1 if not computed yet.
+ */
} PySetObject;
PyAPI_DATA(PyTypeObject) PySet_Type;