Re: [Python-Dev] re performance

2017-01-29 Thread Jakub Wilk
* Armin Rigo , 2017-01-28, 12:44: The theoretical kind of regexp is about giving a "yes/no" answer, whereas the concrete "re" or "regexp" modules gives a match object, which lets you ask for the subgroups' location, for example. Strange at it may seem, I am not aware of a way to do that using t

Re: [Python-Dev] re performance

2017-01-29 Thread Antoine Pitrou
On Sat, 28 Jan 2017 12:07:05 -0500 Barry Warsaw wrote: > On Jan 28, 2017, at 03:43 PM, Nick Coghlan wrote: > > >I still think it could be a good candidate for a first "bundled" > >module, where we don't migrate it fully into the CPython development > >process, but *do* officially bless it and pro

Re: [Python-Dev] re performance

2017-01-29 Thread Steve Holden
Why not declare re deprecated and remove it in Python 4? I am pretty sure everyone wants to keep re in all 3.x releases, but that support need not extend beyond. So Py4 would have no battery for re, but it would (should!) be common knowledge that regex was the go-to module for general-purpose patte

Re: [Python-Dev] re performance

2017-01-29 Thread Paul Moore
On 29 January 2017 at 20:30, Steve Holden wrote: > Why not declare re deprecated and remove it in Python 4? I am pretty sure > everyone wants to keep re in all 3.x releases, but that support need not > extend beyond. So Py4 would have no battery for re, but it would (should!) > be common knowledge

Re: [Python-Dev] re performance

2017-01-29 Thread Serhiy Storchaka
On 29.01.17 22:30, Steve Holden wrote: Why not declare re deprecated and remove it in Python 4? I am pretty sure everyone wants to keep re in all 3.x releases, but that support need not extend beyond. So Py4 would have no battery for re, but it would (should!) be common knowledge that regex was t

Re: [Python-Dev] re performance

2017-01-29 Thread Serhiy Storchaka
On 29.01.17 12:18, Jakub Wilk wrote: * Armin Rigo , 2017-01-28, 12:44: The theoretical kind of regexp is about giving a "yes/no" answer, whereas the concrete "re" or "regexp" modules gives a match object, which lets you ask for the subgroups' location, for example. Strange at it may seem, I am n

Re: [Python-Dev] re performance

2017-01-29 Thread Greg Ewing
Armin Rigo wrote: The theoretical kind of regexp is about giving a "yes/no" answer, whereas the concrete "re" or "regexp" modules gives a match object, which lets you ask for the subgroups' location, for example. Another issue is that the theoretical engine has no notion of greedy/non-greedy ma

Re: [Python-Dev] Generator objects and list comprehensions?

2017-01-29 Thread Craig Rodrigues
On Thu, Jan 26, 2017 at 4:09 AM, Ivan Levkivskyi wrote: > > > Concerning list/set/dict comprehensions, I am much more in favor of making > comprehensions simply equivalent to for-loops (more or less like you > proposed using yield from). The only reason to introduce auxiliary function > scope was