Serhiy Storchaka added the comment: I think MizardX means that match object should be iterable. This will allow sequence unpacking.
>>> import re >>> m = re.match(r'(\w+):(\w+)', 'qwerty:asdfgh') >>> k, v = m >>> k 'qwerty' >>> v 'asdfgh' This idea looks reasonable to me. Here is simple preliminary patch which implements it. ---------- keywords: +patch nosy: +serhiy.storchaka stage: needs patch -> patch review title: Converge re.findall and re.finditer -> Make re match object iterable type: behavior -> enhancement versions: +Python 3.5 -Python 3.2 Added file: http://bugs.python.org/file36192/re_matchobj_iterable.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9529> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com