Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment:

(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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9529>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to