Return the name corresponding to an object. Not all objects necessarily need to be nameable, and not all that do have a "name" property. Override as needed.
(self)
| 357 | return that |
| 358 | |
| 359 | def Name(self): |
| 360 | """Return the name corresponding to an object. |
| 361 | |
| 362 | Not all objects necessarily need to be nameable, and not all that do have |
| 363 | a "name" property. Override as needed. |
| 364 | """ |
| 365 | |
| 366 | # If the schema indicates that "name" is required, try to access the |
| 367 | # property even if it doesn't exist. This will result in a KeyError |
| 368 | # being raised for the property that should be present, which seems more |
| 369 | # appropriate than NotImplementedError in this case. |
| 370 | if "name" in self._properties or ( |
| 371 | "name" in self._schema and self._schema["name"][3] |
| 372 | ): |
| 373 | return self._properties["name"] |
| 374 | |
| 375 | raise NotImplementedError(self.__class__.__name__ + " must implement Name") |
| 376 | |
| 377 | def Comment(self): |
| 378 | """Return a comment string for the object. |
no outgoing calls
no test coverage detected