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

Terry J. Reedy report at bugs.python.org
Sat Apr 26 00:20:39 CEST 2008


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I consider the difference between builtin and def'ed functions to be
something of an implementation wart -- one that I would like to see
someday removed if sensibly possible.  How is a beginner to know that
the parameter names used in the docs and help() responses are not really
parameter names?

In the meanwhile, I think something like the following in the doc would
help: "(Note: an implementation may provide builtin functions whose
positional parameters do not have names, even if they are 'named' for
the purpose of documentation, and which therefore cannot be supplied by
keyword.)"

Also in the meanwhile, the OP can def-wrap builtins
import builtins
def abs(number): return builtins.abs(number)
# but some like int require more care with its no-default option

----------
nosy: +tjreedy

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


More information about the Python-bugs-list mailing list