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

Class Descriptor

Lib/test/test_descr.py:4791–4797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4789 # issue 4230
4790
4791 class Descriptor(object):
4792 counter = 0
4793 def __get__(self, obj, objtype=None):
4794 def getter(name):
4795 self.counter += 1
4796 raise AttributeError(name)
4797 return getter
4798
4799 descr = Descriptor()
4800 class A(object):

Callers 1

test_getattr_hooksMethod · 0.70

Calls

no outgoing calls

Tested by 1

test_getattr_hooksMethod · 0.56