[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2019-10-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with David. The SRE_Scanner object is not public. Its search() method 
is used for implementing finditer(). Its match() method could be useful for 
implementing a functional equivalent of \G in Perl. But I do not know a use 
case for its fullmatch() method.

If anybody provide a use case for SRE_Scanner.fullmatch() this issue can be 
reopened.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2019-10-27 Thread Kyle Stanley


Kyle Stanley  added the comment:

> Is anyone able to make a call on whether this issue should be closed, or 
> alternatively give some guidance on what work this issue should encompass?

Added Serhiy to the nosy list, since he's an active maintainer for the re 
module.

--
nosy: +aeros

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2019-10-27 Thread Kyle Stanley


Change by Kyle Stanley :


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2019-10-27 Thread Lewis Gaul


Lewis Gaul  added the comment:

Scanner is not documented in CPython's own re documentation: 
https://docs.python.org/3/library/re.html#regular-expression-objects, so I'd 
say there's no obligation to maintain consistency with public APIs.

Is anyone able to make a call on whether this issue should be closed, or 
alternatively give some guidance on what work this issue should encompass?

--
nosy: +Lewis Gaul

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2014-03-21 Thread Gareth Gouldstone

Gareth Gouldstone added the comment:

Scanner may not be a public interface but it is widely documented, not least on 
page 67 of the O'reilly Python Cookbook.

Even if Scanner is not made public, then surely it should maintain consistency 
with the public interfaces?

--
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



[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2014-03-20 Thread Gareth Gouldstone

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



[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2014-03-20 Thread Gareth Gouldstone

Gareth Gouldstone added the comment:

I also encountered issue 20998, which explains the convoluted [^\W\d_] in place 
of [a-zA-Z] as I was investigating why case-insensitivity and quantifiers would 
not work together.

--

___
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



[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2014-03-20 Thread R. David Murray

R. David Murray added the comment:

Scanner isn't a public interface, so the real enhancement here would be to make 
it one, in which case adding fullmatch would make sense.  I don't know if 
making it public is a good idea or not.

--
nosy: +r.david.murray, twouters
type: behavior - enhancement
versions: +Python 3.5 -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