Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or "before" (lines above the key, may contain newlines). ``key=None`` sets a document comment, position "start" (default) or "end". An empty `text` removes the comment at that position.
(self, key: Any, text: Any, position: str | None = None)
| 370 | return _comments.get_comment(self, key) |
| 371 | |
| 372 | def set_comment(self, key: Any, text: Any, position: str | None = None) -> None: |
| 373 | """ |
| 374 | Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or |
| 375 | "before" (lines above the key, may contain newlines). ``key=None`` sets a document comment, |
| 376 | position "start" (default) or "end". An empty `text` removes the comment at that position. |
| 377 | """ |
| 378 | _comments.set_comment(self, key, text, position) |
| 379 | |
| 380 | def del_comment(self, key: Any = None) -> None: |
| 381 | """Remove every comment of `key` (``None``: the document comments).""" |
no outgoing calls