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