[Patches] [Patch #103303] patch to fix dis.py in the face of function attributes

noreply@sourceforge.net noreply@sourceforge.net
Thu, 18 Jan 2001 18:41:16 -0800


Patch #103303 has been updated. 

Project: python
Category: library
Status: Closed
Submitted by: bwarsaw
Assigned to : gvanrossum
Summary: patch to fix dis.py in the face of function attributes

Follow-Ups:

Date: 2001-Jan-18 18:41
By: gvanrossum

Comment:
Checked in, with one change: test for im_func first and for func_code
second, like it did before.  I was surprised that with the test for
func_code first it worked for (un)bound methods, but it really did!  The
reason is that if C.f is an unbound method, the expression C.f.func_code
(which previously was not defined) now passes the func_code attribute to
the function!  Still, it's more logical to test for im_func first so we
don't rely on this dubious behavior.

Closed.

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

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=103303&group_id=5470