New submission from Gareth Gouldstone: I believe that the SRE_Scanner object should have a .fullmatch() method for consistency with other re pattern-matching behaviour.
>>> rex = re.compile('([^\\W\\d_]{1,2}[0-9]{1,2}[^\\d\\W_]?)[ >>> \\t]*([0-9][^\\d\\W_]{2})') >>> rex.scanner('bn20bs') <_sre.SRE_Scanner object at 0x102006400> >>> rex.scanner('bn20bs').search() <_sre.SRE_Match object; span=(0, 6), match='bn20bs'> >>> rex.scanner('bn20bs').match() <_sre.SRE_Match object; span=(0, 6), match='bn20bs'> >>> rex.scanner('bn20bs').fullmatch() >>> Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: '_sre.SRE_Scanner' object has no attribute 'fullmatch' ---------- components: Regular Expressions messages: 214317 nosy: Gareth.Gouldstone, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: _sre.SRE_Scanner object should have a fullmatch() method type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21002> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com