Is re.findall guaranteed to be "in order?"
Fredrik Lundh
fredrik at pythonware.com
Wed Jul 16 03:27:10 EDT 2008
Joshua Kugler wrote:
> Experimenting has shown me that re.findall() will return a list with the
> matches in the order it found them.
"in the order it found them" doesn't really say much, does it? ;-)
"findall" and "finditer" both scans the string from left to right, and
will return matches in that order.
(the documentation is a bit vague, so if you have the time, please add a
request for clarification to the bug tracker)
</F>
More information about the Python-list
mailing list