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

Method __dir__

dm_control/mjcf/element.py:383–397  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

381 index=siblings.index(self))
382
383 def __dir__(self):
384 out_dir = set()
385 classes = (type(self),)
386 while classes:
387 super_classes = set()
388 for klass in classes:
389 out_dir.update(klass.__dict__)
390 super_classes.update(klass.__bases__)
391 classes = super_classes
392 out_dir.update(self._spec.children)
393 out_dir.update(self._spec.attributes)
394 if constants.CLASS in out_dir:
395 out_dir.remove(constants.CLASS)
396 out_dir.add(constants.DCLASS)
397 return sorted(out_dir)
398
399 def find(self, namespace, identifier):
400 """Finds an element with a particular identifier.

Callers

nothing calls this directly

Calls 3

updateMethod · 0.45
removeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected