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

Class computed_attribute

Lib/test/test_descr.py:1892–1902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1890 # Testing computed attributes...
1891 class C(object):
1892 class computed_attribute(object):
1893 def __init__(self, get, set=None, delete=None):
1894 self.__get = get
1895 self.__set = set
1896 self.__delete = delete
1897 def __get__(self, obj, type=None):
1898 return self.__get(obj)
1899 def __set__(self, obj, value):
1900 return self.__set(obj, value)
1901 def __delete__(self, obj):
1902 return self.__delete(obj)
1903 def __init__(self):
1904 self.__x = 0
1905 def __get_x(self):

Callers 1

CClass · 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…