New submission from Robert Collins :
Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 'asd'.find('s', None, None) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: slice indices must be integers or None or have an __index__ method >>> 'asd'.rfind('s', None, None) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: slice indices must be integers or None or have an __index__ method >>> # Note that this works, at the price of a memory copy, >>> # and on large strings that is undesirable. >>> 'asd'[None:None].find('s') 1 >>> 'asd'[None:None].rfind('s') 1 >>> ---------- messages: 56332 nosy: rbcollins severity: normal status: open title: string find and rfind methods give a TypeError that is misleading versions: Python 2.5 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1259> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com