diff options
author | Aaron Hall, MBA <aaronchall@yahoo.com> | 2018-05-20 23:46:42 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-20 23:46:42 (GMT) |
commit | 4054b172ab59054715a2aaf4979bd84ac23e3ada (patch) | |
tree | e21f94afd65ee1cd88e011649fd6147f03567a12 /Doc/howto/descriptor.rst | |
parent | aef639f62677f8a342af24e9c19f0503b0d1e36e (diff) | |
download | cpython-4054b172ab59054715a2aaf4979bd84ac23e3ada.zip cpython-4054b172ab59054715a2aaf4979bd84ac23e3ada.tar.gz cpython-4054b172ab59054715a2aaf4979bd84ac23e3ada.tar.bz2 |
bpo-26103: Fix inspect.isdatadescriptor() and a data descriptor definition. (GH-1959)
Look for '__set__' or '__delete__'.
Diffstat (limited to 'Doc/howto/descriptor.rst')
-rw-r--r-- | Doc/howto/descriptor.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 5e85a9a..6e4aa3e 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -58,7 +58,7 @@ 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 as an attribute. -If an object defines both :meth:`__get__` and :meth:`__set__`, it is considered +If an object defines :meth:`__set__` or :meth:`__delete__`, it is considered a data descriptor. Descriptors that only define :meth:`__get__` are called non-data descriptors (they are typically used for methods but other uses are possible). |