classification
Title: Documentation for re.compile is a bit outdated
Type: enhancement Stage:
Components: Documentation, Regular Expressions Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Sworddragon, SylvainDe, docs@python, emilyemorehouse, ezio.melotti, matrixise, mrabarnett, rhettinger, swapnil agarwal
Priority: normal Keywords: easy

Created on 2016-03-28 15:21 by Sworddragon, last changed 2017-06-19 11:55 by swapnil agarwal.

Messages (8)
msg262571 - (view) Author: (Sworddragon) Date: 2016-03-28 15:21
The documentation for re.compile says "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 implies that match() and search() are the only methods for it while there are a few more. Maybe this sentence should be worded more generic or at least complete the list.
msg279259 - (view) Author: St├ęphane Wirtel (matrixise) * Date: 2016-10-23 13:05
What do you propose for the doc of re.compile ?
msg279273 - (view) Author: (Sworddragon) Date: 2016-10-23 18:40
The proposal is in the startpost.
msg279285 - (view) Author: Matthew Barnett (mrabarnett) * Date: 2016-10-23 20:28
@Sworddragon: Your post says that it should be more generic or complete the list, but it doesn't make a suggestion as to what it should _actually_ say.

Example: "Compile a regular expression pattern into a regular expression object, which can be used for matching and replacing using the methods described below."
msg295130 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-06-04 16:37
FWIW, I think the sentence is fine as-is.  The "which can be used" part doesn't purport to be all inclusive.   I rather like that at match() and search() are mentioned -- this is better than more vague reference to "the methods described below" -- and this is better than listing out every method.

I vote for leaving this alone.
msg295724 - (view) Author: SylvainDe (SylvainDe) * Date: 2017-06-11 17:59
IMHO, the sentence is not bad as it is. An easy (?) yet efficient way to make it much better from the a user perspective would be to make the "regular expression object" text a link leading to https://docs.python.org/3/library/re.html#regular-expression-objects .
msg295840 - (view) Author: Emily Morehouse (emilyemorehouse) * Date: 2017-06-13 03:03
YAHO (yet another humble opinion), I support improving the current re.compile documentation by adding a link to the regular expression object documentation. Great way to point a user to the complete list of methods and attributes while keeping match() and search() listed explicitly.
msg296317 - (view) Author: swapnil agarwal (swapnil agarwal) Date: 2017-06-19 11:55
hello team,

I am novice developer. Can I take it up as my first bug.
History
Date User Action Args
2017-06-19 11:55:14swapnil agarwalsetnosy: + swapnil agarwal
messages: + msg296317
2017-06-13 03:03:38emilyemorehousesetnosy: + emilyemorehouse
messages: + msg295840
2017-06-11 17:59:05SylvainDesetnosy: + SylvainDe
messages: + msg295724
2017-06-04 16:37:25rhettingersetstatus: pending -> open
nosy: + rhettinger
messages: + msg295130

2017-06-04 15:50:29serhiy.storchakasetkeywords: + easy
status: open -> pending
2016-10-23 20:28:22mrabarnettsetmessages: + msg279285
2016-10-23 18:40:50Sworddragonsetmessages: + msg279273
2016-10-23 13:05:39matrixisesetnosy: + matrixise
messages: + msg279259
2016-10-16 22:30:20serhiy.storchakasetnosy: + ezio.melotti, mrabarnett

type: behavior -> enhancement
components: + Regular Expressions
versions: + Python 3.6, Python 3.7
2016-03-28 15:21:24Sworddragoncreate