MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / _assign

Method _assign

dm_control/mjcf/attribute.py:403–411  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

401 conflict_behavior)
402
403 def _assign(self, value):
404 if not isinstance(value, str):
405 raise ValueError('Expect a string value: got {}'.format(value))
406 elif not value:
407 self.clear()
408 else:
409 self._parent.namescope.replace(
410 constants.BASEPATH, self._path_namespace, value)
411 self._value = value
412
413 def _before_clear(self):
414 if self._value:

Callers

nothing calls this directly

Calls 2

replaceMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected