Message2875

Author mehendran
Recipients
Date 2007-08-31.10:07:05
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I have attached the patch file.
This patch will solve the following bugs

1768970 
-------
When you iterate over subclass of / sequence like
objects, only the pyget is called previously. 
Now it will call __getitem__ method by this patch 
so that we can extend sequence like objs and give 
our own impln to __getitem__.

https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1768970&group_id=12867

1782565
-------
The output of repr() builtin func on string objects (str, unicode and subclasses of those) / __repr__()
of string objects doesnt match with that of CPython.

https://sourceforge.net/tracker/index.php?func=detail&aid=1782565&group_id=12867&atid=112867

1783868
-------
class weirdstr(str):
    def __getitem__(self, index):
        return weirdstr(2*str.__getitem__(self,index))

When you call __getitem__ of weirdstr obj, it calls
__getitem__ of str in turn, again from there(str) the 
call is made to __getitem__ of weirdstr, thus the call is made back and forth and finally throws 
StackOverflowError.

https://sourceforge.net/tracker/index.php?func=detail&aid=1783868&group_id=12867&atid=112867

Test case: Lib/test/test_builtin.py  
History
Date User Action Args
2008-02-20 17:18:49adminlinkissue1785475 messages
2008-02-20 17:18:49admincreate