Properly initializes self._elements and self._eIds. Any existing element will get its parent weakrefs become None and will be garbage collected. >>> e1 = Element(name='Child') >>> e1 = Element(name='Child') >>> e = Element(name='Parent', elements=[e1])
(self)
| 1315 | return None |
| 1316 | |
| 1317 | def clearElements(self): |
| 1318 | """Properly initializes self._elements and self._eIds. Any existing |
| 1319 | element will get its parent weakrefs become None and will be garbage |
| 1320 | collected. |
| 1321 | |
| 1322 | >>> e1 = Element(name='Child') |
| 1323 | >>> e1 = Element(name='Child') |
| 1324 | >>> e = Element(name='Parent', elements=[e1]) |
| 1325 | >>> len(e) |
| 1326 | 1 |
| 1327 | >>> e.clearElements() |
| 1328 | >>> len(e) |
| 1329 | 0 |
| 1330 | """ |
| 1331 | self._elements = [] |
| 1332 | self._eIds = {} |
| 1333 | |
| 1334 | def clear(self): |
| 1335 | """Make inheriting classes define a method to clear their content if |
no outgoing calls
no test coverage detected