[Patches] [Patch #103123] PEP 232 implementation (function attributes)

noreply@sourceforge.net noreply@sourceforge.net
Sat, 06 Jan 2001 07:34:17 -0800


Patch #103123 has been updated. 

Project: python
Category: core (C code)
Status: Open
Submitted by: bwarsaw
Assigned to : gvanrossum
Summary: PEP 232 implementation (function attributes)

Follow-Ups:

Date: 2001-Jan-06 07:34
By: montanaro

Comment:
Quick nit in the doc:  How about "functions written in Python" instead of
"non-built-in functions"? - right at the start of the patch.

Also, how about an example of what you are trying to avoid when you don't
allow setting bound methods' attributes (besides the obvious fact that
classes and instances already have their own attributes)

class C:
  def meth(self):
    print "hi!"

c = C()
d = C()
c.meth.attr = "my name is 'c'"
d.meth.attr = "my name is 'd'"

If bound method attribute setting was allowed, c.meth.attr return "my name
is 'd'"...

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

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

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