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.

Author terry.reedy
Recipients ezio.melotti, pitrou, serhiy.storchaka, terry.reedy
Date 2014-01-18.00:17:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390004248.1.0.263745704603.issue20283@psf.upfronthosting.co.za>
In-reply-to
Content
How nasty. I agree that this is a code bug. Unfortunately in this case, the C code does keyword matching of arguments and 'corrects' the doc for anyone who tries 'string='.

>>> pat.search(string='xabc', pos=1)
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    pat.search(string='xabc', pos=1)
TypeError: Required argument 'pattern' (pos 1) not found
>>> pat.search(pattern='xabc', pos=1)
<_sre.SRE_Match object; span=(1, 4), match='abc'>

I think we should only change this in 3.4 (and should do so in 3.4).
History
Date User Action Args
2014-01-18 00:17:28terry.reedysetrecipients: + terry.reedy, pitrou, ezio.melotti, serhiy.storchaka
2014-01-18 00:17:28terry.reedysetmessageid: <1390004248.1.0.263745704603.issue20283@psf.upfronthosting.co.za>
2014-01-18 00:17:28terry.reedylinkissue20283 messages
2014-01-18 00:17:28terry.reedycreate