Fix minor grammatical/typographical issues.
This commit is contained in:
parent
fb086746da
commit
da726ba476
|
@ -23,7 +23,7 @@ Rationale
|
|||
=========
|
||||
|
||||
Peeking in the class ``__dict__`` works for regular classes, but can
|
||||
cause problems when a class dynamicly looks up attributes in a
|
||||
cause problems when a class dynamically looks up attributes in a
|
||||
``__getattribute__`` method.
|
||||
|
||||
This new hook makes it possible to affect attribute lookup for both normal
|
||||
|
@ -45,7 +45,7 @@ In Python code
|
|||
A meta type can define a method ``__locallookup__`` that is called during
|
||||
attribute resolution by both ``super.__getattribute__`` and ``object.__getattribute``::
|
||||
|
||||
class MetaType (type):
|
||||
class MetaType(type):
|
||||
|
||||
def __locallookup__(cls, name):
|
||||
try:
|
||||
|
@ -53,7 +53,7 @@ attribute resolution by both ``super.__getattribute__`` and ``object.__getattrib
|
|||
except KeyError:
|
||||
raise AttributeError(name) from None
|
||||
|
||||
The example method above is pseudo code for the implementation of this method on
|
||||
The example method above is pseudocode for the implementation of this method on
|
||||
`type`_ (the actual implementation is in C, and doesn't suffer from the recursion
|
||||
problem in this example).
|
||||
|
||||
|
|
Loading…
Reference in New Issue