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

2005-04-03 Thread ottrey
Hi Gustavo!, On 4/4/2005, "Gustavo Niemeyer" <[EMAIL PROTECTED]> wrote: >> Well, that would be something I'd want to discuss here. As I'm not >> sure if I actually ~want~ to match the API of the re module. > >If this feature is considered a good addition for the standard >library, integrating it

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

2005-04-03 Thread Gustavo Niemeyer
Greetings Chris, > Well, that would be something I'd want to discuss here. As I'm not > sure if I actually ~want~ to match the API of the re module. If this feature is considered a good addition for the standard library, integrating it on re would be an interesting option. But given what you say

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

2005-04-03 Thread Pierre Barbier de Reuille
[EMAIL PROTECTED] a écrit : Nicolas Fleury wrote: > [...] Actually, I ~would~ like to limit it to just named groups. I reckon, if you're not going to bother naming a group, then why would you have any interest in it. I guess its up for discussion how confusing this "new" way of thinking could be

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

2005-04-02 Thread ottrey
Nicolas Fleury wrote: > > ottrey at py.redsoft.be 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) > x > > > > {'verse': [{'number': '12', 'activ