Message113121
(1) would break existing code. It would also mean that you wouldn't have access to the start and end positions of the matches either.
(2) would also break existing code which is expecting a list. It's like the change that happened when some methods which return a list in Python 2 return a generator in Python 3. I think it's too late now because we're already at Python 3.1. If you want to reduce the memory footprint then you can still do:
items = (m.groups() for m in re.finditer(r'(\w+):(\w+)', text))
for key,value in items:
data[key] = value |
|
Date |
User |
Action |
Args |
2010-08-06 17:46:39 | mrabarnett | set | recipients:
+ mrabarnett, timehorse, ezio.melotti, moreati, MizardX |
2010-08-06 17:46:39 | mrabarnett | set | messageid: <1281116799.61.0.627502848952.issue9529@psf.upfronthosting.co.za> |
2010-08-06 17:46:38 | mrabarnett | link | issue9529 messages |
2010-08-06 17:46:38 | mrabarnett | create | |
|