Update suggested by gmcm -- method is stored in dict alongside

attribute access handler
This commit is contained in:
Paul Prescod 2000-07-21 21:59:29 +00:00
parent e743584658
commit 3f32c8df87
1 changed files with 9 additions and 7 deletions

View File

@ -133,13 +133,15 @@ Proposed Implementation
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