[Python-bugs-list] [Bug #115845] sre: maxsplit as keyword argument

noreply@sourceforge.net noreply@sourceforge.net
Mon, 2 Oct 2000 06:41:31 -0700


Bug #115845, was updated on 2000-Oct-02 06:31
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: sre: maxsplit as keyword argument

Details: Split gives TypeError when called as a method of compiled
regular expression object with maxsplit as keyword argument.
This error is only in sre, pre is OK.

Python 1.6 (#2, Sep  6 2000, 18:20:07) [C] on osf1V4
>>> import re
>>> patt = re.compile(' ')
>>> list = patt.split("a b c",50)              # OK
>>> list = re.split(' ',"a b c",maxsplit=50)   # OK     
>>> list = patt.split("a b c",maxsplit=50)     # ERROR
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: this function takes no keyword arguments

>>> import pre
>>> patt = pre.compile(' ')
>>> list = patt.split("a b c",maxsplit=50)     # OK



For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=115845&group_id=5470