mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
note that descriptor objects must be instances of new-style types
(closes SF bug #817742)
This commit is contained in:
parent
e143bbb610
commit
67a521ef69
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
\emph{owner} class. In the examples below, ``the attribute'' refers to
|
||||
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}
|
||||
Called to get the attribute of the owner class (class attribute access)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue