classification
Title: Missing whitespace after comma in randrange raise error
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: cheryl.sabella, louielu, miss-islington, rhettinger, terry.reedy, xtreak
Priority: normal Keywords: patch, patch, patch, patch

Created on 2019-01-19 05:53 by louielu, last changed 2019-03-05 20:52 by rhettinger. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11620 merged python-dev, 2019-01-19 08:57
PR 11620 merged python-dev, 2019-01-19 08:57
PR 11620 merged python-dev, 2019-01-19 08:57
PR 11620 merged python-dev, 2019-01-19 08:57
PR 11640 closed miss-islington, 2019-01-21 19:20
PR 11640 closed miss-islington, 2019-01-21 19:20
PR 11640 closed miss-islington, 2019-01-21 19:20
Messages (8)
msg334033 - (view) Author: Louie Lu (louielu) * Date: 2019-01-19 05:53
In random.py:randrange

  File "/usr/lib/python3.7/random.py", line 200, in randrange
    raise ValueError("empty range for randrange() (%d,%d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (3,3, 0)


should be "empty range for randrange() (3, 3, 0)"
msg334035 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-01-19 05:59
Cheryl, do you want to neaten-up this error message?  

It is triggered by randrange(3, 3).
msg334060 - (view) Author: Louie Lu (louielu) * Date: 2019-01-19 11:37
I previously close this issue is because not sure if someone rely on exception string to do something, should we consider this?
msg334062 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2019-01-19 11:58
> I previously close this issue is because not sure if someone rely on exception string to do something, should we consider this?

I think this is a valid issue since error messages have been modified in the past. I am not sure if this will be backported to 3.7 though.
msg334168 - (view) Author: miss-islington (miss-islington) Date: 2019-01-21 19:20
New changeset 2433a2ab705e93f9a44f01c260d351b205a73e9d by Miss Islington (bot) (Kumar Akshay) in branch 'master':
bpo-35782: Fix error message in randrange (GH-11620)
https://github.com/python/cpython/commit/2433a2ab705e93f9a44f01c260d351b205a73e9d
msg334364 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-25 19:07
We usually don't backport exception message changes, for the reason given, unless the content is wrong or misleading.  Unless Raymond says otherwise, I think the backport should be closed as too trivial and this issue closed as fixed.
msg337217 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-03-05 16:07
Assigning to Raymond regarding the question about the backport.
msg337238 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2019-03-05 20:52
I concur with Terry that no backport is warranted.
History
Date User Action Args
2019-03-05 20:52:24rhettingersetstatus: open -> closed
messages: + msg337238

keywords: patch, patch, patch, patch
resolution: fixed
stage: patch review -> resolved
2019-03-05 16:07:33cheryl.sabellasetkeywords: patch, patch, patch, patch
assignee: cheryl.sabella -> rhettinger
messages: + msg337217
2019-01-25 19:07:42terry.reedysetkeywords: patch, patch, patch, patch
nosy: + terry.reedy
messages: + msg334364

2019-01-21 19:20:54miss-islingtonsetpull_requests: + pull_request11415
2019-01-21 19:20:42miss-islingtonsetpull_requests: + pull_request11414
2019-01-21 19:20:31miss-islingtonsetpull_requests: + pull_request11413
2019-01-21 19:20:12miss-islingtonsetnosy: + miss-islington
messages: + msg334168
2019-01-19 11:58:03xtreaksetkeywords: patch, patch, patch, patch
nosy: + xtreak
messages: + msg334062

2019-01-19 11:37:17louielusetmessages: + msg334060
2019-01-19 08:57:25python-devsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request11372
2019-01-19 08:57:20python-devsetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request11371
2019-01-19 08:57:15python-devsetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request11370
2019-01-19 08:57:10python-devsetkeywords: + patch
stage: needs patch -> needs patch
pull_requests: + pull_request11369
2019-01-19 06:08:57xtreaksetstage: resolved -> needs patch
2019-01-19 05:59:53rhettingersetstatus: closed -> open

nosy: + rhettinger, cheryl.sabella
messages: + msg334035

assignee: cheryl.sabella
2019-01-19 05:56:54louielusetstatus: open -> closed
stage: resolved
2019-01-19 05:53:32louielucreate