How do I get to *all* of the groups of an re search?

Steve Holden sholden at holdenweb.com
Sun Jan 12 12:50:35 EST 2003


"Kyler Laird" <Kyler at news.Lairds.org> wrote ...
> Tim Peters <tim.one at comcast.net> writes:
>
[...]
>
> >I don't think so.  You expected that .group(n) would return a list of all
> >substrings matched by group n, but that's a different question than what
the
> >regular expression component \n should match.
>
> Yes, I'm sorry.  I was simply thinking of them being the same.
> I agree that such a practice would render \1 useless in the RE.
>
Well, at least we are all starting to agree on the reasonableness of the
*implementation*.

[...]
>
> No, I want what is documented.  I want what would seem obvious
> to someone who has not been tainted by experience with other
> languages.
>
Wanting "what would seem obvious" to anyone other than yourself is a recipe
for disappointment. It "seems obvious" to me that you are wasting time
complaining about something that isn't going to change. It probably "seems
obvious" to you that I'm wrong, and that you are trying to improve the
language on behalf of all its users. It probably "seems obvious" to other
readers that we are both wasting our time since we will not agree on what
needs doing.

> Failing that, I'd like all documentation of Python to be
> correct on its own.
>
There's a difference between "on its own" and "in its entirety".

> >> They won't have the experience to look at a piece of Python
> >> documentation and say "Oh, but surely they don't mean *that*."
>
> >If they also have the humility to read all the docs before presuming they
> >understand any of it, no problem -- it's documented multiple times.  If
you
> >actually write docs for newbies, you'll know that newbies also space out
> >easily when too much info is presented.  Repeating all relevant pieces of
> >info at every point isn't friendly to newbies either.
>
> I'm not asking for everything to be repeated.  I just want the
> incorrect stuff deleted.
>
Amen to that. Hence my earlier request that you submit a change. Either by
email or through the SourceForge bug systems.

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Bring your musical instrument to PyCon!    http://www.python.org/pycon/








More information about the Python-list mailing list