Kaydet (Commit) 67a521ef authored tarafından Fred Drake's avatar Fred Drake

note that descriptor objects must be instances of new-style types

(closes SF bug #817742)
üst e143bbb6
...@@ -1296,7 +1296,8 @@ containing the method (a so-called \emph{descriptor} class) appears in ...@@ -1296,7 +1296,8 @@ containing the method (a so-called \emph{descriptor} class) appears in
the class dictionary of another new-style class, known as the the class dictionary of another new-style class, known as the
\emph{owner} class. In the examples below, ``the attribute'' refers to \emph{owner} class. In the examples below, ``the attribute'' refers to
the attribute whose name is the key of the property in the owner the attribute whose name is the key of the property in the owner
class' \code{__dict__}. class' \code{__dict__}. Descriptors can only be implemented as
new-style classes themselves.
\begin{methoddesc}[object]{__get__}{self, instance, owner} \begin{methoddesc}[object]{__get__}{self, instance, owner}
Called to get the attribute of the owner class (class attribute access) Called to get the attribute of the owner class (class attribute access)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment