[Python-Dev] PySequence_Fast_GET_ITEM in string join
Andrew Dalke
dalke at dalkescientific.com
Tue May 23 16:52:21 CEST 2006
Me [Andrew Dalke] said:
> The relevant code in stringobject uses PySequence_Fast_GET_ITEM(seq,
> i),
> which likely doesn't know about my derived __getitem__.
Oops, I didn't know what the code was doing well enough. The
relevant problem is
seq = PySequence_Fast(orig, "");
That calls __iter__ on my derived list object, which knows nothing
about my overridden __getitem__
So things are working as designed.
Well, back to blundering about. Too much brennivin. ;)
Andrew
dalke at dalkescientific.com
More information about the Python-Dev
mailing list