Spell check and wrap.
This commit is contained in:
parent
0e2e677032
commit
a4ec9acf45
13
pep-0447.txt
13
pep-0447.txt
|
@ -48,7 +48,7 @@ up attributes (that is, ``super.__getattribute__`` unconditionally
|
|||
peeks in the class ``__dict__``), and that can be problematic for
|
||||
dynamic classes that can grow new methods on demand.
|
||||
|
||||
The ``__locallookup__`` method makes it possible to dynamicly add
|
||||
The ``__locallookup__`` method makes it possible to dynamically add
|
||||
attributes even when looking them up using the `super class`_.
|
||||
|
||||
The new method affects ``object.__getattribute__`` (and
|
||||
|
@ -138,8 +138,9 @@ The slot has the following prototype::
|
|||
|
||||
PyObject* (*locallookupfunc)(PyTypeObject* cls, PyObject* name);
|
||||
|
||||
This method should lookup *name* in the namespace of *cls*, without looking
|
||||
at superclasses, and should not invoke descriptors. The method returns ``NULL`` without setting an exception when the *name* cannot be found, and returns a
|
||||
This method should lookup *name* in the namespace of *cls*, without looking at
|
||||
superclasses, and should not invoke descriptors. The method returns ``NULL``
|
||||
without setting an exception when the *name* cannot be found, and returns a
|
||||
new reference otherwise (not a borrowed reference).
|
||||
|
||||
Use of this hook by the interpreter
|
||||
|
@ -173,7 +174,7 @@ regular source tree, both based on changeset a5681f50bae2, run on an idle
|
|||
machine an Core i7 processor running Centos 6.4.
|
||||
|
||||
Even though the machine was idle there were clear differences between runs,
|
||||
I've seen difference in "minimum time" vary from -0.1% to +1.5%, with simular
|
||||
I've seen difference in "minimum time" vary from -0.1% to +1.5%, with similar
|
||||
(but slightly smaller) differences in the "average time" difference.
|
||||
|
||||
::
|
||||
|
@ -395,8 +396,8 @@ An earlier version of this PEP used the following static method on classes::
|
|||
|
||||
def __getattribute_super__(cls, name, object, owner): pass
|
||||
|
||||
This method performed name lookup as well as invoking descriptors and was necessarily
|
||||
limited to working only with ``super.__getattribute__``.
|
||||
This method performed name lookup as well as invoking descriptors and was
|
||||
necessarily limited to working only with ``super.__getattribute__``.
|
||||
|
||||
|
||||
Reuse ``tp_getattro``
|
||||
|
|
Loading…
Reference in New Issue