Guido van Rossum wrote: > And how is it more consistent that in one form you have to write > > re.compile(r"[a-z]+", re.I).search(line) > > while in the other form you have to write > > re.search(r"[a-z]+", line, re.I) > > ??? > > This parameter ordering issue alone makes me cringe at adding the > flags to the functions. I agree. In fact, probably the line parameter should have been the first parameter for all functions, but anyway it's too late for that. The few times I have not used pattern objects in quick scripts, I always put the line at first at the wrong place instinctively, probably for the reason you mention (and I'm not pretending my instinct is universal). In that context, keeping the API is even more reasonable. Regards, Nicolas
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4