[docs] Bug in RE module documentation

Sandro Tosi sandro.tosi at gmail.com
Thu Aug 25 22:47:38 CEST 2011


Hi Gene,

On Thu, Aug 25, 2011 at 05:28, Gene Wood <gene_wood at cementhorizon.com> wrote:
> Sandro,
>    Thanks very much for your response.
> Regarding the difference between the 2.6 and 2.7 documentation, indeed
> you're correct. I should have sent this link instead :
> http://docs.python.org/release/2.6/library/re.html#re.compile
> However the text that I'm referring to is identical in the 2.7 and 2.6 docs.

yes, I just wanted to point out that the different documentation could
be backed up by a change on the underlying code.

> If the intent of this part of the doc is "to give a clue, mentioning the
> most commonly used
> methods" I would recommend changing the language from :
> "Compile a regular expression pattern into a regular expression object,
> which can be used for matching using its match() and search() methods,
> described below."
>
> which is very specific to something like :
> "Compile a regular expression pattern into a regular expression object,
> which can be used for matching using methods such as match() and search(),
> described below."
>
> which conveys that "match" and "search" are merely the most commonly used
> methods and that all methods apply. The existing method implies those 2
> methods specifically.

Well, what I gave you was just my personal interpretation (and so it
might be wrong). It just says that for matching the returned object
has match() and search() methods - but afterall you're reading the
doc, so you can probably sort out that the object has other methods.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


More information about the docs mailing list