MCPcopy Create free account
hub / github.com/GeWu-Lab/AnyTouch2 / __getattr__

Method __getattr__

util/misc.py:100–106  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

98 self.meters[k].update(v)
99
100 def __getattr__(self, attr):
101 if attr in self.meters:
102 return self.meters[attr]
103 if attr in self.__dict__:
104 return self.__dict__[attr]
105 raise AttributeError("'{}' object has no attribute '{}'".format(
106 type(self).__name__, attr))
107
108 def __str__(self):
109 loss_str = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected