Add a read-only `{prop_name}` property to the parent element class. The property locates and returns this child element or `None` if not present.
(self)
| 321 | self._add_to_class(self._new_method_name, creator) |
| 322 | |
| 323 | def _add_getter(self): |
| 324 | """Add a read-only `{prop_name}` property to the parent element class. |
| 325 | |
| 326 | The property locates and returns this child element or `None` if not present. |
| 327 | """ |
| 328 | property_ = property(self._getter, None, None) |
| 329 | # assign unconditionally to overwrite element name definition |
| 330 | setattr(self._element_cls, self._prop_name, property_) |
| 331 | |
| 332 | def _add_inserter(self): |
| 333 | """Add an ``_insert_x()`` method to the element class for this child element.""" |
no outgoing calls
no test coverage detected