The default identifier used if this element is not named by the user.
(self)
| 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() |