[Tutor] Faster procedure to filter two lists . Please help
Tim Peters
tim.peters at gmail.com
Sun Jan 16 01:56:06 CET 2005
[Alan Gauld]
> OK, The timbot's word is good enough for me, I won't bother
> looking at the code, I'll revert to my previous assumption! :-)
It's educational to look at the code anyway <wink>. Here it is, from
Python's listobject.c:
static int
list_length(PyListObject *a)
{
return a->ob_size;
}
People shouldn't be afraid to look at C code -- it won't bite them,
and it's often the easiest way to get a definitive answer about the
implementation. OTOH, people should be afraid to _write_ C code: it
will bite you every time <0.9 wink>.
More information about the Tutor
mailing list