MCPcopy Index your code
hub / github.com/python/cpython / _is_descriptor

Function _is_descriptor

Lib/enum.py:37–45  ·  view source on GitHub ↗

Returns True if obj is a descriptor, False otherwise.

(obj)

Source from the content-addressed store, hash-verified

35 self.value = value
36
37def _is_descriptor(obj):
38 """
39 Returns True if obj is a descriptor, False otherwise.
40 """
41 return (
42 hasattr(obj, '__get__') or
43 hasattr(obj, '__set__') or
44 hasattr(obj, '__delete__')
45 )
46
47def _is_dunder(name):
48 """

Callers 3

__setitem__Method · 0.85
_add_member_Method · 0.85
convert_classFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…