[Patches] [ python-Patches-664192 ] 661913: inconsistent error messages between string an unicod

SourceForge.net noreply@sourceforge.net
Wed, 08 Jan 2003 10:45:36 -0800


Patches item #664192, was opened at 2003-01-08 05:27
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=664192&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Christopher Blunck (blunck2)
Assigned to: Nobody/Anonymous (nobody)
Summary: 661913: inconsistent error messages between string an unicod

Initial Comment:
'a'.index('b'):   substring not found in index
u'a'.index('b'): substring not found     (bah!)

same thing follows for rindex.

changed unicodeobject.c to return same error message as
what string returns.



----------------------------------------------------------------------

Comment By: Inyeol Lee (inyeol)
Date: 2003-01-08 18:45

Message:
Logged In: YES 
user_id=595280

Hmm... I think the patch should be in the
opposite direction - leaving unicode message
as is and fix stringobject.c to make the
message the same as unicode. I've scanned
all the exception messages in string methods
and (r)index() is the only method which contains
method name in its exception message. For example,

>>> 'a'.split('')
ValueError: empty separator

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=664192&group_id=5470