Terry J. Reedy added the comment: 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). ---------- nosy: +terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20283> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com