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

"Martin v. Löwis" martin at v.loewis.de
Sun Apr 3 08:48:16 CEST 2005


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 developers can readily agree that a functionality should
be added (i.e. it is "obvious" for some reason), it is added right away.
Otherwise, a PEP should be written, and reviewed by the community.

In the specific case, Chris Ottrey submitted a link to his project to
the SF patches tracker, asking for inclusion. I felt that there is
likely no immediate agreement, and suggested he asks on python-dev,
and writes a PEP.

If this kind of functionality would fall on immediate rejection for
some reason, even writing the PEP might be pointless. If the
functionality is generally considered useful, a PEP can be written,
and then implemented according to the PEP procedures (i.e. collect
feedback, discuss alternatives, ask for BDFL pronouncement).

I personally think that the proposed functionality should *not* live
in a separate module, but somehow be integrated into SRE. Whether or
not the proposed functionality is useful in the first place, I don't
know. I never have nested named groups in my regular expressions.

Regards,
Martin


More information about the Python-Dev mailing list