Issue30399
Created on 2017-05-18 15:32 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 1650 | merged | serhiy.storchaka, 2017-05-18 15:39 | |
| Messages (3) | |||
|---|---|---|---|
| msg293928 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-05-18 15:32 | |
The repr() of BaseException (and all exceptions that don't override __repr__) with a single argument contains a redundant trailing comma:
>>> BaseException('spam')
BaseException('spam',)
This is just an artefact of the implementation.
Proposed patch removes this comma.
|
|||
| msg293977 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2017-05-19 21:28 | |
I think the trailing comma is slightly worse than redundant, as someone who has forgotten the trailing comma rule for calls can mistakenly read it as making the arg a tuple. So +1 on removing it. |
|||
| msg306278 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2017-11-15 15:53 | |
New changeset f8a4c03ede6048022f60a58d5a21b278b78a8a16 by Serhiy Storchaka in branch 'master': bpo-30399: Get rid of trailing comma in the repr of BaseException. (#1650) https://github.com/python/cpython/commit/f8a4c03ede6048022f60a58d5a21b278b78a8a16 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:46 | admin | set | github: 74584 |
| 2017-11-15 15:54:13 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017-11-15 15:53:32 | serhiy.storchaka | set | messages: + msg306278 |
| 2017-05-19 21:28:28 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg293977 |
| 2017-05-19 18:22:10 | serhiy.storchaka | set | title: Get rid of trailing comma if the repr() of BaseException -> Get rid of trailing comma in the repr() of BaseException |
| 2017-05-18 15:39:31 | serhiy.storchaka | set | pull_requests: + pull_request1745 |
| 2017-05-18 15:32:17 | serhiy.storchaka | create | |