guido wrote: > > how about adding a "finditer" method, which takes care of > > the low-level setup: > > > > >>> for match in p.finditer(somestring): > > >>> print match.groups() > > > > or should we just make the scanner factory an official part > > of the SRE interface? > > Or both? The scanner interface seems vaguely useful as a low-level > tool to create other higher-level variants; but the finditer() call > seems to nicely capture a common case. as you might have noticed, I went ahead and checked in code for "finditer". nobody has complained this far ;-) isn't "iterfind" a better name, btw? more like "iterkeys" (etc). if nobody complains, I'll change the name, and check in some documentation. ::: will have to think about scanner; I agree that it may seem to be vaguely useful, but cannot think of a use case that isn't better handled by findall/split/sub or iterfind. can anyone? </F>
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