diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-09 01:00:06 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-09 01:00:06 (GMT) |
commit | 74efb718715414334ebb040056a1f359a8cc2c2a (patch) | |
tree | 79df5c864bcf12414fdff2db3548ffbf6d821adb | |
parent | 31dc3735a5538792c907b796119afd94bc22e19c (diff) | |
parent | 0ed8c6897c2330950643fda6c6e8ee283c030311 (diff) | |
download | cpython-74efb718715414334ebb040056a1f359a8cc2c2a.zip cpython-74efb718715414334ebb040056a1f359a8cc2c2a.tar.gz cpython-74efb718715414334ebb040056a1f359a8cc2c2a.tar.bz2 |
Merge with 3.1.
-rw-r--r-- | Doc/library/stdtypes.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index e3c8b15..e24c450 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) |