This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Describe formation of method objects more accurately
Type: Stage:
Components: Documentation Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, gjm-w
Priority: normal Keywords: patch

Created on 2003-06-04 17:12 by gjm-w, last changed 2022-04-10 16:09 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ref3.patch gjm-w, 2003-06-04 17:12 patch to python/dist/src/Doc/ref/ref3.tex
Messages (3)
msg43894 - (view) Author: Gareth McCaughan (gjm-w) Date: 2003-06-04 17:12
The documentation doesn't currently describe
user-defined method objects very well, nor does
it mention static method objects and class method
objects (except in passing, while describing the
staticmethod and classmethod functions).

For instance, it says "User-defined method objects are
created in two ways: when getting an attribute of a
class that is a user-defined function object, or when
getting an attribute of a class instance that is a
user-defined function object defined by the class of
the instance."

It's not obvious what "defined by the class of the
instance"
means.

(1) If it means "when the function was defined, that was
within the scope of a `class' statement", then it's
just plain wrong; it doesn't matter where the function
was defined.

(2) If it means "the place from which the attribute is
retrieved is the class rather than the instance",
it's right, but that doesn't seem to me a natural
reading.

(3) If it means "the exact place from which the attribute
is retrieved is the class's dictionary" (as opposed
to that of some other class) then it's wrong; a
superclass would do just as well.

It's also too specific; as well as user-defined function
objects, the same process is applied to certain
user-defined
method objects, and to class method objects.

There are similar problems elsewhere.

*

The attached patch improves this state of affairs.
It's relative to python/dist/src/Doc/ref/ref3
from CVS as of a couple of hours ago.

One oddity I don't understand: with this patch
applied, the reference manual has a larger than
expected vertical space between the first two
paragraphs beginning "When a user-defined
method object is created". Both these paragraphs
are newly created by the patch, so this must be
my fault somehow. I don't see how. :-)
msg43895 - (view) Author: Gareth McCaughan (gjm-w) Date: 2003-06-04 17:15
Logged In: YES 
user_id=338732

The summary suggests that the scope of the patch is
a little narrower than it really is. The changes it makes
are:
  - improve the description of how user-defined method
    objects get made
  - improve the description of attribute retrieval from
    classes and class instances
  - add brief documentation of static method and
    class method objects.
msg43896 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2003-07-17 05:27
Logged In: YES 
user_id=3066

Committed a slightly modified version of this patch as
Doc/ref/ref3.tex revision 1.112.  The changes were almost
entirely at the level of markup rather than content (and
only a couple of words were changed there).

Thanks!
History
Date User Action Args
2022-04-10 16:09:02adminsetgithub: 38589
2003-06-04 17:12:57gjm-wcreate