summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorNotAFile <notafile@gmail.com>2018-09-10 21:35:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2018-09-10 21:35:38 (GMT)
commit28ea4c284724283265e95d1d1716c9f1dfc2d741 (patch)
tree310764219ce3ee9953064787d7a07b4a1cf98b6d /Doc/howto
parent3286ce4adee85c5ce8ab3ee3089f3cd44a017fd7 (diff)
downloadcpython-28ea4c284724283265e95d1d1716c9f1dfc2d741.zip
cpython-28ea4c284724283265e95d1d1716c9f1dfc2d741.tar.gz
cpython-28ea4c284724283265e95d1d1716c9f1dfc2d741.tar.bz2
switch descriptor howto to return value annotation (GH-7796)
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/descriptor.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst
index 6e4aa3e..7b00d94 100644
--- a/Doc/howto/descriptor.rst
+++ b/Doc/howto/descriptor.rst
@@ -48,11 +48,11 @@ a flexible set of new tools for everyday Python programs.
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
considered a descriptor and can override default behavior upon being looked up