[Python-Dev] RE: [Python-checkins] python/dist/src/Objects listobject.c, 2.177, 2.178

Raymond Hettinger python at rcn.com
Fri Feb 13 21:41:52 EST 2004

[Neal Norwitz]
> Missing the return -1; when list_resize() fails?

Yes.  Will fix.

> In the following 2 for loops, the original code modified
> self->ob_size. In the new version I don't notice ob_size
> being updated. Given the context, I'm not sure if the behaviour
> is different or not between versions.

self->ob_size is now updated by list_resize() so the loop
no longer needs to do the update.  This is a nice improvement
clients of list_resize() do not need to manage ob_size; rather,
the just request the size they want and the data structure keeps
its integrity.


More information about the Python-Dev mailing list