Troubleshooting: re.finditer() creates object even when no match found

Steven Bethard steven.bethard at gmail.com
Fri Dec 17 15:55:06 EST 2004


Chris Lasher wrote:
> Is there any way to request a feature like
> this from the RE module keepers, whomever they may be?

The most direct way would be to go to Python at sourceforge[1] and make 
a feature request to add peek to itertools.  (This is probably the most 
reasonable location for it.)  Requests accompanied by patches are much 
more likely to be accepted. =)  Of course, your feature, if accepted, 
wouldn't be applied until Python 2.5, which is probably about a year and 
a half off.

I actually thought about doing this myself, but I've got a few other 
things on my stack, and since itertools is (I believe) written in C, 
writing the patch would be a little more work...

> In the meantime, may I use your code, with accredation to you?

Help yourself.  That's what the Cookbook's for. =)

[1] http://sourceforge.net/projects/python/



More information about the Python-list mailing list