MCPcopy Index your code
hub / github.com/RustPython/RustPython / _is_descriptor

Function _is_descriptor

Lib/enum.py:36–44  ·  view source on GitHub ↗

Returns True if obj is a descriptor, False otherwise.

(obj)

Source from the content-addressed store, hash-verified

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

Callers 3

__setitem__Method · 0.85
_add_member_Method · 0.85
convert_classFunction · 0.85

Calls 1

hasattrFunction · 0.85

Tested by

no test coverage detected