()
| 279 | """ |
| 280 | |
| 281 | def get() -> Iterator[str]: |
| 282 | for pre, fill, node in self: |
| 283 | if isinstance(node, str): |
| 284 | yield f"{fill}{node}" |
| 285 | continue |
| 286 | attr = ( |
| 287 | attrname(node) |
| 288 | if callable(attrname) |
| 289 | else getattr(node, attrname, "") |
| 290 | ) |
| 291 | if isinstance(attr, list | tuple): |
| 292 | lines = attr |
| 293 | else: |
| 294 | lines = str(attr).split("\n") |
| 295 | yield f"{pre}{lines[0]}" |
| 296 | for line in lines[1:]: |
| 297 | yield f"{fill}{line}" |
| 298 | |
| 299 | return "\n".join(get()) |
| 300 |