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

Method _default_identifier

dm_control/mjcf/element.py:371–381  ·  view source on GitHub ↗

The default identifier used if this element is not named by the user.

(self)

Source from the content-addressed store, hash-verified

369
370 @property
371 def _default_identifier(self):
372 """The default identifier used if this element is not named by the user."""
373 if not self._spec.identifier:
374 return None
375 else:
376 siblings = self.root.find_all(self._spec.namespace,
377 exclude_attachments=True)
378 return '{separator}unnamed_{namespace}_{index}'.format(
379 separator=constants.PREFIX_SEPARATOR,
380 namespace=self._spec.namespace,
381 index=siblings.index(self))
382
383 def __dir__(self):
384 out_dir = set()

Callers

nothing calls this directly

Calls 1

find_allMethod · 0.45

Tested by

no test coverage detected