Re: [Python-Dev] Error message for wrong number of arguments

Aug. 3, 2018
1:32 p.m.
Actually, I just realized that it's not really possible to fix the error messages for built-in methods. The problem is that Argument Clinic does not know whether a function or method is being handled. For example, there is no indication at all that this is a method (note that the name "list.insert" might refer to a function "insert" inside a module called "list" or a method "insert" or a class "list"): /*[clinic input] list.insert index: Py_ssize_t object: object / Insert object before index. [clinic start generated code]*/

August 2018
1:35 p.m.
New subject: Error message for wrong number of arguments
Actually, scratch that, I posted too soon. There is also a block /*[clinic input] class list "PyListObject *" "&PyList_Type" [clinic start generated code]*/ So it could work.
2454
Age (days ago)
2454
Last active (days ago)
1 comments
1 participants
participants (1)
-
Jeroen Demeyer