diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-09-10 17:44:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-10 17:44:58 -0700 |
| commit | f3d00ae3be27ede2fc834d9d2b0028c9ad39f492 (patch) | |
| tree | 1a4c005d76256b0ecfc098dfbe322b2a1d9c8887 | |
| parent | 011141f312f11b35ac163d9d52fe48e4bb61a814 (diff) | |
| download | cpython-git-f3d00ae3be27ede2fc834d9d2b0028c9ad39f492.tar.gz | |
switch descriptor howto to return value annotation (GH-7796)
(cherry picked from commit 28ea4c284724283265e95d1d1716c9f1dfc2d741)
Co-authored-by: NotAFile <notafile@gmail.com>
| -rw-r--r-- | Doc/howto/descriptor.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 5e85a9aa65..e5412583a6 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 |
