This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Asheesh.Laroia, amaury.forgeotdarc, brian.curtin, christian.heimes, ezio.melotti, georg.brandl, r.david.murray, rarana, terry.reedy
Date 2010-07-28.23:41:22
SpamBayes Score 1.4247005e-06
Marked as misclassified No
Message-id <>
I believe these patches are wrong, at least in part, and should be reverted.

1.The re module no longer has either a class RegexObject or a class MatchObject. (They are now _sre.SRE_Pattern and _sre.SRE_Match.) So 
the previous reference to them as anonymous "Compiled regular expression objects" and "Match objects" (lower case 'objects') was correct, certainly more correct that marking the fake names as real code. In other words. 'MatchObject' should be removed, not hyperlinked.

This issue came up today on python-list when someone tried "help(re.MatchObject)" and got a module attribute error. I was about to open a new issue when I discovered this one. I recommend changing the re.match entry from "return a corresponding MatchObject instance." to "return a match object" (which is what the current doc string says) and removing all the misleading RegexObject and MatchObject fake-class method prefixes, The prefixes are present in 2.6 and already removed in 2.7. I think they should also be removed from the 3.x docs. (Unless, of course, re is changed to add/reinstate those names, which could only happen in 3.2.)

2. I believe it is the policy that the 3.x docs 'start fresh' with 3.0. Ancient back-compatibility notes like

"(Incompatibility note: in the original Python 1.5 release, if the tuple was one element long, a string would be returned instead.  In later versions (from 1.5.1 on), a singleton tuple is returned in such cases.)"

were intentionally, not accidentally, removed in 3.0. So I think it a mistake to put revert the removal and that the reversion should be reverted.

3. This is more of a question. I have noticed that optional parameters with defaults are sometimes bracketed and sometimes not. Since the brackets are redundant, I prefer without as less cluttered and so I question the addition in the 3.2 patch. But is there a definitive current doc style guide? In any case, removing the default value while changing 'group=0' to '[group]' seems wrong.
Date User Action Args
2010-07-28 23:41:25terry.reedysetrecipients: + terry.reedy, georg.brandl, amaury.forgeotdarc, christian.heimes, ezio.melotti, r.david.murray, brian.curtin, Asheesh.Laroia, rarana
2010-07-28 23:41:25terry.reedysetmessageid: <>
2010-07-28 23:41:24terry.reedylinkissue6538 messages
2010-07-28 23:41:22terry.reedycreate