MCPcopy Create free account
hub / github.com/dask/dask / __get__

Method __get__

dask/dataframe/accessor.py:75–85  ·  view source on GitHub ↗
(self, obj, cls)

Source from the content-addressed store, hash-verified

73 self._accessor = accessor
74
75 def __get__(self, obj, cls):
76 if obj is None:
77 # we're accessing the attribute of the class, i.e., Dataset.geo
78 return self._accessor
79 accessor_obj = self._accessor(obj)
80 # Replace the property with the accessor object. Inspired by:
81 # http://www.pydanny.com/cached-property.html
82 # We need to use object.__setattr__ because we overwrite __setattr__ on
83 # NDFrame
84 object.__setattr__(obj, self._name, accessor_obj)
85 return accessor_obj
86
87
88def _register_accessor(name, cls):

Callers

nothing calls this directly

Calls 1

__setattr__Method · 0.45

Tested by

no test coverage detected