Terry J. Reedy <tjre...@udel.edu> added the comment:

I agree that the sentence is a bit confusing and the 'object method' ambiguous. 
I suspect that the sentence was written years ago. In current Python, [].append 
is a bound method of class 'builtin_function_or_method'. I *suspect* that the 
intended contrast, and certainly the important one, is that between C 
functions, which get added to PyTypeObject structures, and their Python object 
wrappers that are visible from Python, but which must not be put in the type 
structure. The varieties of wrappers are irrelevant in this context and for the 
purpose of avoiding that mistake. So I would rewrite the sentence as:

These C functions are called “type methods” to distinguish them from Python 
wrapper objects, such as ``list.append`` or ``[].append``, visible in Python 
code.

Looking further down,
"Now if you go and look up the definition of PyTypeObject in object.h you’ll 
see that it has many more fields that the definition above.",
needs 'that' changed to 'than' and I would insert " following tp_doc" after 
'fields'.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12672>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to