[Patches] [ python-Patches-591250 ] str1 in str2 for len(str1) >= 1

noreply@sourceforge.net noreply@sourceforge.net
Mon, 05 Aug 2002 13:55:58 -0700


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

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: str1 in str2 for len(str1) >= 1

Initial Comment:
Here's a patch to implement and test str1 in str2, when
str1 is more than a single character.
The doc and unicode still need to be updated.  There is
a test.

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

>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-08-05 16:55

Message:
Logged In: YES 
user_id=12800

I actually think Fred should get in on the act because it's
not clear to me where in the docs this should be documented.
 Assigning to Fred for an answer, then he can re-assign back
to me.

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

Comment By: Barry A. Warsaw (bwarsaw)
Date: 2002-08-05 16:50

Message:
Logged In: YES 
user_id=12800

There were some problems with this patch.  test_unicode.py
already contains <wink> some contains tests, which fail with
your patch.  This fixes them at the expense of not
special-casing contains with a single character (in unicode
only -- normal strings still have the special case).  

This version of the patch also adds some more tests.  I
think the only thing left to do is update the docs.


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

Comment By: Neal Norwitz (nnorwitz)
Date: 2002-08-05 15:39

Message:
Logged In: YES 
user_id=33168

Went a little further.  Add unicode support.  Where should
the string/unicode tests go?
string tests are in string_tests.py now, but not sure that
is appropriate.

Still needs:
 * unicode test
 * doc - where?

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-08-05 15:17

Message:
Logged In: YES 
user_id=6380

Let Barry collect the patches. (He sent one in private email
too.)

Does this do Unicode?

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

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