[Python-checkins] peps: Update suggested by gmcm -- method is stored in dict alongside

georg.brandl python-checkins at python.org
Wed Mar 23 21:22:49 CET 2011


http://hg.python.org/peps/rev/5a659d181adf
changeset:   29:5a659d181adf
user:        Paul Prescod <prescod at prescod.net>
date:        Fri Jul 21 21:59:29 2000 +0000
summary:
  Update suggested by gmcm -- method is stored in dict alongside
attribute access handler

files:
  pep-0213.txt |  16 +++++++++-------
  1 files changed, 9 insertions(+), 7 deletions(-)


diff --git a/pep-0213.txt b/pep-0213.txt
--- a/pep-0213.txt
+++ b/pep-0213.txt
@@ -133,13 +133,15 @@
        name (e.g. XXX, not __attr__XXX__
        method (pointer to a method object
    
-    In PyClass_New, methods of
-    the appropriate form will be detected and converted into objects
-    (just like unbound method objects). If there are any attribute access
-    handlers in an instance at all, a flag is set. Let's call 
-    it "I_have_computed_attributes" for now. Derived classes inherit
-    the flag from base classes. Instances inherit the flag from
-    classes.
+    In PyClass_New, methods of the appropriate form will be detected and
+    converted into objects (just like unbound method objects). These are
+    stored in the class __dict__ under the name XXX. The original method
+    is stored as an unbound method under its original name.
+
+    If there are any attribute access handlers in an instance at all,
+    a flag is set. Let's call it "I_have_computed_attributes" for
+    now. Derived classes inherit the flag from base classes. Instances
+    inherit the flag from classes.
  
     A get proceeds as usual until just before the object is returned.
     In addition to the current check whether the returned object is a

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list