Update suggested by gmcm -- method is stored in dict alongside
attribute access handler
This commit is contained in:
parent
e743584658
commit
3f32c8df87
16
pep-0213.txt
16
pep-0213.txt
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue