mirror of
https://github.com/python/cpython.git
synced 2025-11-14 07:49:28 +00:00
switch descriptor howto to return value annotation (GH-7796)
This commit is contained in:
parent
3286ce4ade
commit
28ea4c2847
1 changed files with 3 additions and 3 deletions
|
|
@ -48,11 +48,11 @@ a flexible set of new tools for everyday Python programs.
|
||||||
Descriptor Protocol
|
Descriptor Protocol
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
``descr.__get__(self, obj, type=None) --> value``
|
``descr.__get__(self, obj, type=None) -> value``
|
||||||
|
|
||||||
``descr.__set__(self, obj, value) --> None``
|
``descr.__set__(self, obj, value) -> None``
|
||||||
|
|
||||||
``descr.__delete__(self, obj) --> None``
|
``descr.__delete__(self, obj) -> None``
|
||||||
|
|
||||||
That is all there is to it. Define any of these methods and an object is
|
That is all there is to it. Define any of these methods and an object is
|
||||||
considered a descriptor and can override default behavior upon being looked up
|
considered a descriptor and can override default behavior upon being looked up
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue