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

Chris Barker chris.barker at noaa.gov
Thu Aug 2 13:50:58 EDT 2018


On Wed, Aug 1, 2018 at 2:40 PM, Armin Rigo <armin.rigo at gmail.com> wrote:

> On 30 July 2018 at 22:19, Chris Barker via Python-Dev
> <python-dev at python.org> wrote:
> > Oh well. This is a serious usability issue -- but what can you do?
>
> I think that argument clinic knows if the built-in function is
> supposed to be a method or a function.  It doesn't look too hard to
> add a new flag METH_IS_METHOD or something, which would be taken in
> consideration in the common cases, and which can be added manually OR
> used automatically by argument clinic.  This would not be a 100%
> solution out of the box, but if the new wording is right, it shouldn't
> be a problem.
>

But can you do the same thing with pure-python methods?

After all, this thread started with trying ot unify what error folks get
regardless of how the method was written.


-CHB



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180802/c39ff3ee/attachment.html>


More information about the Python-Dev mailing list