classification
Title: In unittest.TestCase.assertRegex change "re" and "regex" to "r"
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: docs@python, ezio.melotti, py.user, python-dev, terry.reedy
Priority: normal Keywords: patch

Created on 2013-09-07 02:46 by py.user, last changed 2013-09-13 19:23 by ezio.melotti. This issue is now closed.

Files
File name Uploaded Description Edit
issue18951.diff py.user, 2013-09-07 02:46 review
Messages (5)
msg197130 - (view) Author: py.user (py.user) * Date: 2013-09-07 02:46
there is no direct link to table

look under link
http://docs.python.org/3/library/unittest.html#unittest.TestCase.assertWarnsRegex
msg197612 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2013-09-13 17:07
[The information in titles, especially long titles that do not fit in the title box (on my system, at least) should be repeated in the opening message.]

The point of the patch is to use the same name for the same object in the two columns* and to use a single letter to be consistent with the rest of the table. I think the patch should be applied.

* Using 're' and 'regex' to mean the same object *is* confusing.
msg197623 - (view) Author: py.user (py.user) * Date: 2013-09-13 18:07
ok, I will repeat patch contents in message by words to avoid guessing
msg197631 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-13 19:20
New changeset 03e94f9884ce by Ezio Melotti in branch '3.3':
#18951: use consistent names in unittest docs.
http://hg.python.org/cpython/rev/03e94f9884ce

New changeset eb332e3dc303 by Ezio Melotti in branch 'default':
#18951: merge with 3.3.
http://hg.python.org/cpython/rev/eb332e3dc303

New changeset 6d8ff8c57d38 by Ezio Melotti in branch '2.7':
#18951: use consistent names in unittest docs.
http://hg.python.org/cpython/rev/6d8ff8c57d38
msg197632 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-09-13 19:23
Fixed, thanks for the report and the patch!
I also updated the table entry for assertRaisesRegex and assertWarnsRegex.
I avoid using "regex" instead of "re" or "r" to keep it short and avoid confusion with the re/regex modules.  The documentation of the methods uses "regex", but there it's OK.
History
Date User Action Args
2013-09-13 19:23:38ezio.melottisetstatus: open -> closed

assignee: docs@python -> ezio.melotti
versions: + Python 2.7
nosy: + ezio.melotti

messages: + msg197632
resolution: fixed
stage: commit review -> resolved
2013-09-13 19:20:40python-devsetnosy: + python-dev
messages: + msg197631
2013-09-13 18:07:48py.usersetmessages: + msg197623
2013-09-13 17:07:22terry.reedysetnosy: + terry.reedy

messages: + msg197612
stage: commit review
2013-09-07 02:46:26py.usercreate