[Python-bugs-list] [ python-Bugs-446971 ] im_func, user-defined method
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 02 Aug 2001 14:38:27 -0700
Bugs item #446971, was opened at 2001-08-01 15:17
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446971&group_id=5470
Category: Documentation
>Group: Python 2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: im_func, user-defined method
Initial Comment:
>From the language reference:
3.2 The standard type hierarchy
User-defined methods:
A user-defined method object combines a class, a class
instance (or None) and a user-defined function.
...
I take issue with 'user-defined function'. In my
experiments with Python 2.1.1 on Windows 2000, using
the C API, a user-defined method can combine a 'user-
defined function' OR a 'builtin function'.
I call PyObject_GetAttrString( pPyObject, "im_func" ),
and a built-in function type object is returned.
Tom.
----------------------------------------------------------------------
>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-08-02 14:38
Message:
Logged In: YES
user_id=3066
Fixed in Doc/ref/ref3.tex revision 1.71.
The manual used to be right, but more flexibility was added.
Normal usage still only finds user-defined functions there,
but the exceptions module uses built-in functions, and the
"new" module can be used to construct more interesting
objects as well.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=446971&group_id=5470