Merge with 3.1.

This commit is contained in:
Ezio Melotti 2011-05-09 04:00:06 +03:00
commit 74efb71871

View file

@ -1047,6 +1047,15 @@ functions based on regular expressions.
*start* and *end* are interpreted as in slice notation. Return ``-1`` if *start* and *end* are interpreted as in slice notation. Return ``-1`` if
*sub* is not found. *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) .. method:: str.format(*args, **kwargs)