MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / __getattr__

Method __getattr__

utils.py:305–311  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

303 self.meters[k].update(v)
304
305 def __getattr__(self, attr):
306 if attr in self.meters:
307 return self.meters[attr]
308 if attr in self.__dict__:
309 return self.__dict__[attr]
310 raise AttributeError("'{}' object has no attribute '{}'".format(
311 type(self).__name__, attr))
312
313 def __str__(self):
314 loss_str = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected