[docs] [issue12672] Some problems in documentation extending/newtypes.html

Terry J. Reedy report at bugs.python.org
Tue Aug 16 06:44:19 CEST 2011

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

"the type object determines which (C) functions get called when, for instance, an attribute gets looked up on an object or it is multiplied by another object. These C functions are called “type methods”

"These C functions" are any of the C functions that are members of the type object. But they are C-level methods.

"to distinguish them from things like [].append (which we call “object methods”)."

[].append is a Python-level method object that wraps a C function.

My revised suggestion is "... in contrast to PyObject that contain C functions, such as list.append or [].append."

The only contrast that makes sense to me in this context is between directly callable C functions and Py_Objects (which have just been described) that contain a C function. I believe that author is addressing Python programmers who are used to 'method' referring to Python objects whereas the author wants to use 'method' to refer to C functions, which are not Python objects.

Or the sentence could be deleted.


Python tracker <report at bugs.python.org>

More information about the docs mailing list