[issue5863] bz2.BZ2File should accept other file-like objects.
MizardX added the comment: Would if I could. But, No. -- ___ Python tracker <http://bugs.python.org/issue5863> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5863] bz2.BZ2File should accept other file-like objects.
New submission from MizardX : bz2.BZ2File should, like gzip.GzipFile, accept a fileobj argument. If implemented, you could much more easily pipe BZ2-data from other sources, such as stdin or a socket. -- components: IO, Library (Lib) messages: 86716 nosy: MizardX severity: normal status: open title: bz2.BZ2File should accept other file-like objects. type: feature request ___ Python tracker <http://bugs.python.org/issue5863> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9529] Converge re.findall and re.finditer
New submission from MizardX : re.findall and re.finditer has very different signature. One iterates over match objects, the other returns a list of tuples. I can think of two ways to make them more similar: 1) Make match objects iterable over their captures. With this, you could write something like the following: for key,value in re.finditer(r'(\w+):(\w+)', text): data[key] = value 2) Make re.findall return an iterator over tuples. This would decrease the memory footprint. -- components: Regular Expressions messages: 113074 nosy: MizardX priority: normal severity: normal status: open title: Converge re.findall and re.finditer ___ Python tracker <http://bugs.python.org/issue9529> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9529] Converge re.findall and re.finditer
MizardX added the comment: I don't think (1) would break any code. finditer() would still generate match-objects. The only time you would be discard the match-object, is if you try to do a destructuring bind in, e.g. a loop. This shouldn't be unexpected for the programmer. -- ___ Python tracker <http://bugs.python.org/issue9529> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com