(self, obj, cls)
| 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 | |
| 88 | def _register_accessor(name, cls): |
nothing calls this directly
no test coverage detected