A vote for re scanner

Alex Martelli aleax at aleax.it
Thu Nov 13 12:17:13 EST 2003


Wade Leftwich wrote:
   ...
> A scanner is constructed from a regex object and a string to be
> scanned. Each call to the scanner's search() method returns the next
> match object of the regex on the string. So to work on a string that
> has multiple matches, it's the bee's roller skates.

...if that method's name was 'next' (and an appropriate __iter__
also present) it might be even cooler, though...


Alex





More information about the Python-list mailing list