Re: [Python-Dev] Re: hierarchicial named groups extension to the re library

2005-04-07 Thread Anthony Baxter
On Sunday 03 April 2005 16:48, Martin v. Löwis wrote: > If this kind of functionality would fall on immediate rejection for > some reason, even writing the PEP might be pointless. Note that even if something is rejected, the PEP itself is useful - it collects knowledge in a format that's far more

Re: [Python-Dev] Re: hierarchicial named groups extension to the re library

2005-04-03 Thread Gustavo Niemeyer
Greetings, > If this kind of functionality would fall on immediate rejection for > some reason, even writing the PEP might be pointless. If the [...] In my opinion the functionality is useful. > I personally think that the proposed functionality should *not* live > in a separate module, but some

Re: [Python-Dev] Re: hierarchicial named groups extension to the re library

2005-04-03 Thread Phillip J. Eby
At 08:48 AM 4/3/05 +0200, Martin v. Löwis wrote: I personally think that the proposed functionality should *not* live in a separate module, but somehow be integrated into SRE. +1. Whether or not the proposed functionality is useful in the first place, I don't know. I never have nested named group

Re: [Python-Dev] Re: hierarchicial named groups extension to the re library

2005-04-02 Thread Martin v. Löwis
Josiah Carlson wrote: re2 can be used as a limited structural parser. This makes the re module useful for more things than it is currently. The question of it being in the standard library, however, I think should be made based on the criteria used previously (whatever they were). In general, if d

Re: [Python-Dev] Re: hierarchicial named groups extension to the re library

2005-04-02 Thread Josiah Carlson
Nicolas Fleury <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > import re2 > buf='12 drummers drumming, 11 pipers piping, 10 lords a-leaping' > regex='^((?P(?P\d+) (?P[^,]+))(, )?)*$' > pat2=re2.compile(regex) > x=pat2.extract(buf) If one wanted to match the API of t