From: NotAFile Date: Mon, 10 Sep 2018 21:35:38 +0000 (+0200) Subject: switch descriptor howto to return value annotation (GH-7796) X-Git-Tag: v3.8.0a1~1071 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28ea4c284724283265e95d1d1716c9f1dfc2d741;p=thirdparty%2FPython%2Fcpython.git switch descriptor howto to return value annotation (GH-7796) --- diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 6e4aa3e975f6..7b00d947f46b 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