[issue21002] _sre.SRE_Scanner object should have a fullmatch() method
Gareth Gouldstone
report at bugs.python.org
Fri Mar 21 02:31:17 CET 2014
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 <report at bugs.python.org>
<http://bugs.python.org/issue21002>
_______________________________________
More information about the Python-bugs-list
mailing list