Message208311
| Author |
serhiy.storchaka |
| Recipients |
ezio.melotti, pitrou, serhiy.storchaka |
| Date |
2014年01月16日.20:44:27 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1389905067.44.0.489524795145.issue20283@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Documented (in docstring and in ReST documentation) signatures of the match, search and (since 3.4) fullmatch methods of regex pattern object are:
match(string[, pos[, endpos]])
search(string[, pos[, endpos]])
fullmatch(string[, pos[, endpos]])
However in implementation the first keyword argument by mistake named "pattern". This looks as nonsense. The pattern is object itself, and first argument is a string. First arguments in other methods (split, findall, etc) named "string", and module-level functions have both "pattern" and "string" parameters:
match(pattern, string, flags=0)
search(pattern, string, flags=0)
I think we should fix this mistake. The "pattern" name is obviously wrong and is not match the documentation. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年01月16日 20:44:27 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, pitrou, ezio.melotti |
| 2014年01月16日 20:44:27 | serhiy.storchaka | set | messageid: <1389905067.44.0.489524795145.issue20283@psf.upfronthosting.co.za> |
| 2014年01月16日 20:44:27 | serhiy.storchaka | link | issue20283 messages |
| 2014年01月16日 20:44:27 | serhiy.storchaka | create |
|