[docs] [issue7940] re.finditer and re.findall should support negative end positions

M. Anil Tuncel report at bugs.python.org
Mon Jul 15 08:09:03 EDT 2019


M. Anil Tuncel <tuncel.manil at gmail.com> added the comment:

I guess the use of negative indices serve the same purpose here as in lists or strings. 
Though as Ezio pointed out, the current behaviour is already accepting negative indices but providing inconsistent results in comparison to various other Python modules that support negative indices.

In my opinion:
If the negative indices are to be used here (which is what the current implementation suggests), they should behave in the same way as the rest of the Python modules. 
Otherwise, perhaps negative indices should not be allowed here at all. 

What do you think?

P.S. this patch is already applied to the regex module by @mrabarnett

----------
nosy: +anilbey

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue7940>
_______________________________________


More information about the docs mailing list