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

2018年7月30日 11:42:37 -0700

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.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to