[Python-Dev] Error message for wrong number of arguments (original) (raw)
Jeroen Demeyer J.Demeyer at UGent.be
Mon Jul 30 14:39:42 EDT 2018
- Previous message (by thread): [Python-Dev] Error message for wrong number of arguments
- Next message (by thread): [Python-Dev] Error message for wrong number of arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2018-07-30 20:22, Chris Barker wrote:
is it possible for the interpreter to know when this error is generated that this is a bound method expecting a "self", rather than an arbitrary function with n parameters?
That would be quite hard. The error message is generated by the underlying function. At that point, the information of how it was called (as bound method or not) is already gone.
Jeroen.
- Previous message (by thread): [Python-Dev] Error message for wrong number of arguments
- Next message (by thread): [Python-Dev] Error message for wrong number of arguments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]