A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-September/121764.html below:

[Python-Dev] TypeError: f() missing 1 required positional argument: 'x'

[Python-Dev] TypeError: f() missing 1 required positional argument: 'x'Benjamin Peterson benjamin at python.org
Thu Sep 20 16:12:04 CEST 2012
2012/9/20 Mark Dickinson <dickinsm at gmail.com>:
> Thoughts?

I tried to define the error messages in terms of the callee's
signature. I call the formals that are not variadic, keyword variadic,
or keyword-only, positional. For example, in

def f(a, b, c, *args, d):
     pass

a, b, and c are positional. Hence the "positional" in error messages.

As you noted in your next message, keyword-only arguments need to be
distinguished from these "positional" arguments somehow. Maybe it
helps to think of "positional" to mean "the only formals you can pass
to with position" (excepting variadic ones).

I'm certainly open to suggestions.



-- 
Regards,
Benjamin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4