Message208375
| 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:28 | terry.reedy | set | recipients: + terry.reedy, pitrou, ezio.melotti, serhiy.storchaka |
| 2014-01-18 00:17:28 | terry.reedy | set | messageid: <1390004248.1.0.263745704603.issue20283@psf.upfronthosting.co.za> |
| 2014-01-18 00:17:28 | terry.reedy | link | issue20283 messages |
| 2014-01-18 00:17:28 | terry.reedy | create | |