classification
Title: doc misleading in re.compile
Type: enhancement Stage:
Components: Documentation Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, kbriggs, tzot
Priority: normal Keywords:

Created on 2007-01-08 12:09 by kbriggs, last changed 2007-08-23 21:29 by georg.brandl. This issue is now closed.

Messages (3)
msg54970 - (view) Author: Keith Briggs (kbriggs) Date: 2007-01-08 12:09
http://www.python.org/doc/2.5/lib/node46.html has 

compile(pattern[, flags])
Compile a regular expression pattern into a regular expression object, which can be used for matching using its match() and search() methods, described below.

This could be read as implying that the regular expression object can ONLY be used for matching using the match() and search() methods.

In fact, I believe it can be used wherever "pattern" is mentioned.
msg54971 - (view) Author: Χρήστος Γεωργίου (Christos Georgiou) (tzot) * Date: 2007-01-09 20:32
I like exact wording too, but I don't think this is a serious issue. I would suggest, unless you (kbriggs) offers a suitable patch, that this be dropped as a non-bug (it's a RFE, anyway).
msg55221 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 21:29
Normal usage is to create a RE object and then using its methods. Why
would you pass a RE object to a module-level function instead?

Therefore, documenting this possibility would just confuse the reader.
Closing as "won't fix".
History
Date User Action Args
2007-08-23 21:29:40georg.brandlsetstatus: open -> closed
nosy: + georg.brandl
resolution: wont fix
messages: + msg55221
2007-01-08 12:09:59kbriggscreate