Aldwin Pollefeyt <aldwinald...@gmail.com> added the comment:

Modified from re module Pattern.search:
--------
The optional second parameter 'start' gives an index in the string where the 
search is to start; it defaults to 0.

The optional parameter 'end' limits how far the string will be searched; it 
will be as if the string is 'end' characters long, so only the characters from 
'start' to 'end' - 1 will be searched for a match. If 'end' is less than 
'start', no match will be found; otherwise, text.startswith(prefix, start, end) 
gives the same result as text[start:end](prefix).
------------

I don't think this is true like with re:
----
This is not completely equivalent to slicing the string; the '^' pattern 
character matches at the real beginning of the string and at positions just 
after a newline, but not necessarily at the index where the search is to start.
----

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37490>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to