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)
| 927 | return _comments.get_comment(self, key) |
| 928 | |
| 929 | def set_comment(self, key: Any, text: Any, position: str | None = None) -> None: |
| 930 | """ |
| 931 | Attach a comment to an existing key. `position` is "eol" (default, on the key's line) or |
| 932 | "before" (lines above the key, may contain newlines). ``key=None`` sets a document comment, |
| 933 | position "start" (default) or "end". An empty `text` removes the comment at that position. |
| 934 | """ |
| 935 | _comments.set_comment(self, key, text, position) |
| 936 | |
| 937 | def del_comment(self, key: Any = None) -> None: |
| 938 | """Remove every comment of `key` (``None``: the document comments).""" |
no outgoing calls