[issue2677] Argument rules for callables do not apply when function implementation uses PyArg_ParseTuple

Martin v. Löwis report at bugs.python.org
Thu Apr 24 13:14:14 CEST 2008


Martin v. Löwis <martin at v.loewis.de> added the comment:

> Maybe yes, the easier but probably harmless solution is to change the
> documentation and point out that "in general, you can't". Maybe this
> somehow leans towards promoting a bug to the rank of feature? ;-)

The language spec is stuck between saying what the abstract Python
language is supposed to do, and describing what CPython precisely
does. You shouldn't use keyword arguments to pass non-optional
positional arguments, IMO, but the text describes precisely what
happens if you do - for Python functions. The more vague
specification then shouldn't say "you can't" (because that would
indicate that you get an exception when you try), but "it's
unspecified", then going on to say what CPython happens to do
in some release.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2677>
__________________________________


More information about the Python-bugs-list mailing list