[Patches] [ python-Patches-760792 ] "wo" in "word" now valid but not documented as such
SourceForge.net
noreply@sourceforge.net
Wed, 25 Jun 2003 14:35:34 -0700
Patches item #760792, was opened at 2003-06-25 23:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=760792&group_id=5470
Category: Documentation
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gerrit Holl (gerrit)
Assigned to: Nobody/Anonymous (nobody)
Summary: "wo" in "word" now valid but not documented as such
Initial Comment:
http://www.python.org/dev/doc/devel/ref/comparisons.html
states:
"""For the Unicode and string types, x in y is true if
and only if there exists an index i such that x == y[i]
is true. If x is not a string or Unicode object of
length 1, a TypeError exception is raised."""
However, as of Python 2.3, this is no longer True, as
stated in
http://www.python.org/doc/2.3b1/whatsnew/node17.html#SECTION0001710000000000000000:
"""The in operator now works differently for strings.
Previously, when evaluating X in Y where X and Y are
strings, X could only be a single character. That's now
changed; X can be a string of any length, and X in Y
will return True if X is a substring of Y. If X is the
empty string, the result is always True."""
This patch fixes the reference documentation.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=760792&group_id=5470