Skip to content

Commit 51357b8

Browse files
committed
fix
1 parent 19ecd15 commit 51357b8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Doc/library/inspect.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,10 +1670,9 @@ for arbitrary getset descriptors invoking these may trigger
16701670
code execution::
16711671

16721672
import types
1673-
descriptor_types = (types.MemberDescriptorType, types.GetSetDescriptorType, types.WrapperDescriptorType)
16741673

16751674
result = getattr_static(some_object, 'foo')
1676-
if isinstance(result, descriptor_types):
1675+
if isinstance(result, (types.MemberDescriptorType, types.GetSetDescriptorType, types.WrapperDescriptorType)):
16771676
try:
16781677
result = result.__get__(some_object)
16791678
except AttributeError:

0 commit comments

Comments
 (0)