Author mrabarnett
Recipients MizardX, ezio.melotti, moreati, mrabarnett, timehorse
Date 2010-08-07.18:45:07
SpamBayes Score 0.000363416
Marked as misclassified No
Message-id <>
Ah, I see what you mean. I still think you're wrong, though! :-)

The 'for' loop is doing is basically this:

    it = re.finditer(r'(\w+):(\w+)', text)
        while True:
            match_object = next(it)
            # body of loop
    except StopIteration:

re.finditer() it returns a generator which yields match objects.

What I think you're actually requesting (but not realising) is for the 'for' loop not just to iterate over the generator, but also over what the generator yields.

If you want re.finditer() to yield the groups then it has to return a generator which yields those groups, not match objects.
Date User Action Args
2010-08-07 18:45:10mrabarnettsetrecipients: + mrabarnett, timehorse, ezio.melotti, moreati, MizardX
2010-08-07 18:45:09mrabarnettsetmessageid: <>
2010-08-07 18:45:07mrabarnettlinkissue9529 messages
2010-08-07 18:45:07mrabarnettcreate