diff --git a/pep-0290.txt b/pep-0290.txt index a4c55706c..db97fad57 100644 --- a/pep-0290.txt +++ b/pep-0290.txt @@ -153,6 +153,17 @@ Modernization Procedures miscounting. + Pattern: "s1".find("s2") >= 0 or "s1".find("s2") != -1 -> "s2" in "s1" + Idea: In Python 2.3, for "s2" in "s1", the length + restriction on s2 are lifted; they can now be strings + of any length. + Version: 2.3 or later + Benefits: When searching for a substring, where you don't care + about the position of the substring in the original + string, using the `in' operator makes things more + clear. + + References [1] PEP 4, Deprecation of Standard Modules