Re: New implementation of re module

2009-08-04 Thread Alex Willmer
On Jul 27, 5:34 pm, MRAB wrote: > Hi all, > > I've been working on a new implementation of the re module. The details > are athttp://bugs.python.org/issue2636, specifically > fromhttp://bugs.python.org/issue2636#msg90954. I've included a .pyd file for > Python 2.6 on Windows if you want to try it

Re: New implementation of re module

2009-08-03 Thread MRAB
John Machin wrote: On Jul 28, 2:34 am, MRAB wrote: Hi all, I've been working on a new implementation of the re module. The details are athttp://bugs.python.org/issue2636, specifically fromhttp://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you wan

Re: New implementation of re module

2009-08-03 Thread John Machin
On Jul 28, 2:34 am, MRAB wrote: > Hi all, > > I've been working on a new implementation of the re module. The details > are athttp://bugs.python.org/issue2636, specifically > fromhttp://bugs.python.org/issue2636#msg90954. I've included a .pyd file for > Python 2.6 on Windows if you want to try it

Re: New implementation of re module

2009-07-30 Thread MRAB
Piet van Oostrum wrote: MRAB (M) wrote: M> Hi all, M> I've been working on a new implementation of the re module. The details M> are at http://bugs.python.org/issue2636, specifically from M> http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for M> Python 2.6 on Windows if y

Re: New implementation of re module

2009-07-30 Thread MRAB
Wolfgang Rohdewald wrote: On Thursday 30 July 2009, Wolfgang Rohdewald wrote: so I did the conversion mentioned there. This works: I actually do not know if it works - but it compiles. Yes, it works. I've updated my code accordingly and it'll be in the next release. -- http://mail.python.org

Re: New implementation of re module

2009-07-30 Thread Hrvoje Niksic
MRAB writes: > So it complains about: > > ++(RE_CHAR*)context->text_ptr > > but not about: > > ++info->repeat.count > > Does this mean that the gcc compiler thinks that the cast makes it an > rvalue? The cast operator does return an rvalue, treating it otherwise used to be an extension t

Re: New implementation of re module

2009-07-30 Thread Piet van Oostrum
> MRAB (M) wrote: >M> Hi all, >M> I've been working on a new implementation of the re module. The details >M> are at http://bugs.python.org/issue2636, specifically from >M> http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for >M> Python 2.6 on Windows if you want to try it

Re: New implementation of re module

2009-07-30 Thread Wolfgang Rohdewald
On Thursday 30 July 2009, Wolfgang Rohdewald wrote: > so I did the conversion mentioned there. This works: I actually do not know if it works - but it compiles. -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: New implementation of re module

2009-07-30 Thread Wolfgang Rohdewald
On Thursday 30 July 2009, MRAB wrote: > So it complains about: > > ++(RE_CHAR*)context->text_ptr > > but not about: > > ++info->repeat.count > > Does this mean that the gcc compiler thinks that the cast makes it > an rvalue? I'm using Visual C++ 2008 Express Edition, which doesn't > compl

Re: New implementation of re module

2009-07-30 Thread MRAB
Wolfgang Rohdewald wrote: On Thursday 30 July 2009, MRAB wrote: There are other lines which are similar, eg line 1487. Do they all give the same/similar error with your compiler? yes. The full output with gcc-4.3: notebook:~/kmj/src$ LANG=C python setup.py build running build running build_

Re: New implementation of re module

2009-07-30 Thread Wolfgang Rohdewald
On Thursday 30 July 2009, MRAB wrote: > There are other lines which are similar, eg line 1487. Do they all > give the same/similar error with your compiler? yes. The full output with gcc-4.3: notebook:~/kmj/src$ LANG=C python setup.py build running build running build_py running build_ext build

Re: New implementation of re module

2009-07-30 Thread MRAB
Wolfgang Rohdewald wrote: On Tuesday 28 July 2009, Christopher Arndt wrote: setup(name='regex', version='1.0', py_modules = ['regex'], ext_modules=[Extension('_regex', ['_regex.c'])], ) Also, you need to copy "unicodedata_db.h" from the "Modules" directory of the Python source tree

Re: New implementation of re module

2009-07-30 Thread Wolfgang Rohdewald
On Tuesday 28 July 2009, Christopher Arndt wrote: > setup(name='regex', > version='1.0', > py_modules = ['regex'], > ext_modules=[Extension('_regex', ['_regex.c'])], > ) > > Also, you need to copy "unicodedata_db.h" from the "Modules" > directory of the Python source tree to your workin

Re: New implementation of re module

2009-07-29 Thread Mike
On Jul 29, 10:45 am, MRAB wrote: > Mike wrote: > > - findall/finditer doesn't find overlapping matches.  Sometimes you > > really *do* want to know all possible matches, even if they overlap. > > Perhaps by adding "overlapped=True"? Something like that would be great, yes. > > - split won't spl

Re: New implementation of re module

2009-07-29 Thread MRAB
Mike wrote: On Jul 27, 11:34 am, MRAB wrote: I've been working on a new implementation of the re module. Fabulous! If you're extending/changing the interface, there are a couple of sore points in the current implementation I'd love to see addressed: - findall/finditer doesn't find overlappi

Re: New implementation of re module

2009-07-29 Thread Mike
On Jul 27, 11:34 am, MRAB wrote: > I've been working on a new implementation of the re module. Fabulous! If you're extending/changing the interface, there are a couple of sore points in the current implementation I'd love to see addressed: - findall/finditer doesn't find overlapping matches. S

Re: New implementation of re module

2009-07-28 Thread MRAB
William Dode wrote: On 28-07-2009, MRAB wrote: With the official Python 2.6 distribution for Mac OS X it works. The source code is intended to replace the current 're' module in Python 2.7 (and I'll be porting it to Python 3.2), so I'm not that worried about Python versions earlier than 2.6 for

Re: New implementation of re module

2009-07-28 Thread Mark Lawrence
MRAB wrote: Hi all, I've been working on a new implementation of the re module. The details are at http://bugs.python.org/issue2636, specifically from http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you want to try it out. I'm interested in how

Re: New implementation of re module

2009-07-28 Thread Aahz
In article , MRAB wrote: >Aahz wrote: >> In article , >> MRAB wrote: >>> I've been working on a new implementation of the re module. The details >>> are at http://bugs.python.org/issue2636, specifically from >>> http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for >>> Python

Re: New implementation of re module

2009-07-28 Thread William Dode
On 28-07-2009, MRAB wrote: > With the official Python 2.6 distribution for Mac OS X it works. >> > The source code is intended to replace the current 're' module in Python > 2.7 (and I'll be porting it to Python 3.2), so I'm not that worried > about Python versions earlier than 2.6 for testing, a

Re: New implementation of re module

2009-07-28 Thread MRAB
Christopher Arndt wrote: On 27 Jul., 21:27, Wolfgang Rohdewald wrote: how do I compile _regex.c on Linux? This simple setup.py file should do the trick: from distutils.core import setup, Extension setup(name='regex', version='1.0', py_modules = ['regex'], ext_modules=[Extension(

Re: New implementation of re module

2009-07-28 Thread Christopher Arndt
On 27 Jul., 21:27, Wolfgang Rohdewald wrote: > how do I compile _regex.c on Linux? This simple setup.py file should do the trick: from distutils.core import setup, Extension setup(name='regex', version='1.0', py_modules = ['regex'], ext_modules=[Extension('_regex', ['_regex.c'])], )

Re: New implementation of re module

2009-07-28 Thread MRAB
Aahz wrote: In article , MRAB wrote: I've been working on a new implementation of the re module. The details are at http://bugs.python.org/issue2636, specifically from http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you want to try it out. Ho

Re: New implementation of re module

2009-07-27 Thread OKB (not okblacke)
MRAB wrote: > http://bugs.python.org/issue2636#msg90954 Variable-length lookbehind! My hero! -- --OKB (not okblacke) Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown -- http://mail.python.org/ma

Re: New implementation of re module

2009-07-27 Thread Aahz
In article , MRAB wrote: > >I've been working on a new implementation of the re module. The details >are at http://bugs.python.org/issue2636, specifically from >http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for >Python 2.6 on Windows if you want to try it out. How does it

Re: New implementation of re module

2009-07-27 Thread MRAB
William Dode wrote: On 27-07-2009, MRAB wrote: Hi all, I've been working on a new implementation of the re module. The details are at http://bugs.python.org/issue2636, specifically from http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you want to

Re: New implementation of re module

2009-07-27 Thread Wolfgang Rohdewald
On Monday 27 July 2009, MRAB wrote: > I've been working on a new implementation of the re module. The > details are at http://bugs.python.org/issue2636, specifically from > http://bugs.python.org/issue2636#msg90954. I've included a .pyd > file for Python 2.6 on Windows if you want to try it out. h

Re: New implementation of re module

2009-07-27 Thread William Dode
On 27-07-2009, MRAB wrote: > Hi all, > > I've been working on a new implementation of the re module. The details > are at http://bugs.python.org/issue2636, specifically from > http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for > Python 2.6 on Windows if you want to try it out.

New implementation of re module

2009-07-27 Thread MRAB
Hi all, I've been working on a new implementation of the re module. The details are at http://bugs.python.org/issue2636, specifically from http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for Python 2.6 on Windows if you want to try it out. I'm interested in how fast it is ge