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.
Created on 2012年06月27日 08:59 by Ramchandra Apte, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg164129 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2012年06月27日 08:59 | |
C argument errors and Python arguments error are different. For example: all(4,4,4) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: all() takes exactly one argument (3 given) def func(a):pass a(4,4) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: func() takes exactly 1 positional argument (2 given) I do not know which error message is better. I think the second example's (func) error message is better. Though feel free to vote by commenting on this bug. Another example with not enough arguments given: hasattr(4) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: hasattr expected 2 arguments, got 1 func() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: func() takes exactly 1 argument (0 given) I don't know which of this error messages are better. You can vote on this by commenting. |
|||
| msg171610 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2012年09月30日 05:50 | |
This is won't fix at least for now. The way arguments to C functions are parsed prevents them from ever really being the same. Specific improvements can be considered. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:32 | admin | set | github: 59406 |
| 2012年09月30日 05:50:41 | benjamin.peterson | set | status: open -> closed nosy: + benjamin.peterson messages: + msg171610 resolution: wont fix |
| 2012年09月30日 03:18:03 | Ramchandra Apte | set | versions: + Python 3.4, - Python 3.2 |
| 2012年06月27日 15:46:44 | Arfrever | set | nosy:
+ Arfrever |
| 2012年06月27日 08:59:22 | Ramchandra Apte | create | |