This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: re.finditer() doesn't accept keyword arguments
Type: behavior Stage: resolved
Components: Regular Expressions Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: eric.araujo, ezio.melotti, jafo, mrabarnett, py.user, python-dev
Priority: normal Keywords: needs review, patch

Created on 2012-03-12 05:22 by py.user, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
cpython-re-finditer-kwargs.patch jafo, 2012-03-12 23:46 Add keyword arguments to finditer() review
Messages (4)
msg155441 - (view) Author: py.user (py.user) * Date: 2012-03-12 05:22
>>> import re
>>> p = re.compile(r'abc')
>>> res = p.search('abcdefabcdef', pos=1, endpos=10)
>>> res = p.match('abcdefabcdef', pos=1, endpos=10)
>>> res = p.findall('abcdefabcdef', pos=1, endpos=10)
>>> res = p.finditer('abcdefabcdef', pos=1, endpos=10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: finditer() takes no keyword arguments
>>>
msg155512 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2012-03-12 22:58
Working on this.
msg155526 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2012-03-12 23:46
Attached is a patch which implements this, including updated tests.  I would appreciate a review of this patch.
msg155536 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-13 00:22
New changeset 1adb114343f9 by Sean Reifschneider in branch 'default':
closes #14259 re.finditer() now takes keyword arguments: pos, endpos.
http://hg.python.org/cpython/rev/1adb114343f9
History
Date User Action Args
2022-04-11 14:57:27adminsetgithub: 58467
2012-03-13 00:22:55python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg155536

resolution: fixed
stage: patch review -> resolved
2012-03-12 23:46:43jafosetfiles: + cpython-re-finditer-kwargs.patch
messages: + msg155526

assignee: ezio.melotti
keywords: + patch, needs review
stage: patch review
2012-03-12 23:17:04eric.araujosetnosy: + eric.araujo

versions: + Python 3.3, - Python 3.2
2012-03-12 22:58:49jafosetnosy: + jafo
messages: + msg155512
2012-03-12 05:26:56eric.smithsettitle: regex.finditer() doesn't accept keyword arguments -> re.finditer() doesn't accept keyword arguments
2012-03-12 05:22:56py.usercreate