MCPcopy
hub / github.com/python-openxml/python-docx / get

Method get

src/docx/comments.py:77–80  ·  view source on GitHub ↗

Return the comment identified by `comment_id`, or |None| if not found.

(self, comment_id: int)

Source from the content-addressed store, hash-verified

75 return comment
76
77 def get(self, comment_id: int) -> Comment | None:
78 """Return the comment identified by `comment_id`, or |None| if not found."""
79 comment_elm = self._comments_elm.get_comment_by_id(comment_id)
80 return Comment(comment_elm, self._comments_part) if comment_elm is not None else None
81
82
83class Comment(BlockItemContainer):

Calls 2

CommentClass · 0.85
get_comment_by_idMethod · 0.80