Message208375
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). |
|
| 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: <[email protected]> |
| 2014-01-18 00:17:28 | terry.reedy | link | issue20283 messages |
| 2014-01-18 00:17:28 | terry.reedy | create | |
|