Issue 36282: Not accurate error message for exact number of positional arguments
Created on 2019-03-13 20:44 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12310 | merged | serhiy.storchaka, 2019-03-13 20:48 | |
| Messages (2) | |||
|---|---|---|---|
| msg337874 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-03-13 20:44 | |
Due to minor error, the error message for too many positional arguments is not accurate if the function uses Argument Clinic. For example: >>> int.from_bytes(b'a', 'little', False) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: from_bytes() takes at most 2 positional arguments (3 given) This is correct, but not accurate, because from_bytes() takes *exactly* 2 positional arguments. |
|||
| msg337876 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-03-13 21:03 | |
New changeset f2f55e7f03d332fd43bc665a86d585a79c3b3ed4 by Serhiy Storchaka in branch 'master': bpo-36282: Improved error message for too much positional arguments. (GH-12310) https://github.com/python/cpython/commit/f2f55e7f03d332fd43bc665a86d585a79c3b3ed4 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:12 | admin | set | github: 80463 |
| 2019-03-14 07:28:16 | serhiy.storchaka | set | status: open -> closed type: behavior -> enhancement resolution: fixed stage: patch review -> resolved |
| 2019-03-13 21:03:25 | serhiy.storchaka | set | messages: + msg337876 |
| 2019-03-13 20:48:44 | serhiy.storchaka | set | keywords:
+ patch stage: patch review pull_requests: + pull_request12285 |
| 2019-03-13 20:44:52 | serhiy.storchaka | create | |
