mirror of https://github.com/python/cpython
56780257c6
The following patch adds "sq_contains" support to rangeobject, and enables the already-written support for sq_contains in listobject and tupleobject. The rangeobject "contains" code should be a bit more efficient than the current default "in" implementation ;-) It might not get used much, but it's not that much to add. listobject.c and tupleobject.c already had code for sq_contains, and the proper struct member was set, but the PyType structure was not extended to include tp_flags, so the object-specific code was not getting called (Go ahead, test it ;-). I also did this for the immutable_list_type in listobject.c, eventhough it is probably never used. Symmetry and all that. |
||
---|---|---|
.. | ||
.cvsignore | ||
Makefile.in | ||
abstract.c | ||
bufferobject.c | ||
classobject.c | ||
cobject.c | ||
complexobject.c | ||
dictobject.c | ||
fileobject.c | ||
floatobject.c | ||
frameobject.c | ||
funcobject.c | ||
intobject.c | ||
listobject.c | ||
longobject.c | ||
methodobject.c | ||
moduleobject.c | ||
object.c | ||
rangeobject.c | ||
sliceobject.c | ||
stringobject.c | ||
tupleobject.c | ||
typeobject.c | ||
unicodectype.c | ||
unicodeobject.c | ||
xxobject.c |