On 5/23/06, Andrew Dalke <dalke at dalkescientific.com> wrote: > 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__ Put another way, the problem is related to your initial claim: > I can derive from list and override __getitem__ You can do that, but you should not. It's almost a bug that you can. Jeremy > > So things are working as designed. > > Well, back to blundering about. Too much brennivin. ;) > > Andrew > dalke at dalkescientific.com > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: http://mail.python.org/mailman/options/python-dev/jeremy%40alum.mit.edu >
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4