From: Raymond Hettinger Date: Wed, 18 Nov 2015 04:58:43 +0000 (-0800) Subject: Add assertion to verify the pre-condition in the comments. X-Git-Tag: v3.6.0a1~1035 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66f6238fca7286a3917eab0e9fafd7aa6f8e90a4;p=python Add assertion to verify the pre-condition in the comments. --- diff --git a/Objects/setobject.c b/Objects/setobject.c index 083cbea412..7fde01f599 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -269,6 +269,7 @@ set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash) size_t i = (size_t)hash & mask; size_t j; + assert(so->fill == so->used); while (1) { entry = &table[i]; if (entry->key == NULL)