[Patches] [ python-Patches-749012 ] Describe formation of method objects more accurately

SourceForge.net noreply@sourceforge.net
Wed, 04 Jun 2003 10:12:57 -0700


Patches item #749012, was opened at 2003-06-04 17:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=749012&group_id=5470

Category: Documentation
Group: Python 2.2.x
Status: Open
Resolution: None
Priority: 5
Submitted By: Gareth McCaughan (gjm-w)
Assigned to: Nobody/Anonymous (nobody)
Summary: Describe formation of method objects more accurately

Initial Comment:
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. :-)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=749012&group_id=5470