summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-05-09 01:00:47 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-05-09 01:00:47 (GMT)
commit60480454bc57c2a52225ca7ed4cb1374e707e73a (patch)
tree0d41d28de093707142f75794253da4655bae2341
parenteaee1385a084d3b5b680539974f4af1d927ddc68 (diff)
parent74efb718715414334ebb040056a1f359a8cc2c2a (diff)
downloadcpython-60480454bc57c2a52225ca7ed4cb1374e707e73a.zip
cpython-60480454bc57c2a52225ca7ed4cb1374e707e73a.tar.gz
cpython-60480454bc57c2a52225ca7ed4cb1374e707e73a.tar.bz2
Merge with 3.2.
-rw-r--r--Doc/library/stdtypes.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index c0c75f7..4a7efe1 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1047,6 +1047,15 @@ functions based on regular expressions.
*start* and *end* are interpreted as in slice notation. Return ``-1`` if
*sub* is not found.
+ .. note::
+
+ The :meth:`~str.find` method should be used only if you need to know the
+ position of *sub*. To check if *sub* is a substring or not, use the
+ :keyword:`in` operator::
+
+ >>> 'Py' in 'Python'
+ True
+
.. method:: str.format(*args, **kwargs)