MCPcopy Index your code
hub / github.com/python-openxml/python-docx / __iter__

Method __iter__

src/docx/comments.py:24–29  ·  view source on GitHub ↗

Iterator over the comments in this collection.

(self)

Source from the content-addressed store, hash-verified

22 self._comments_part = comments_part
23
24 def __iter__(self) -> Iterator[Comment]:
25 """Iterator over the comments in this collection."""
26 return (
27 Comment(comment_elm, self._comments_part)
28 for comment_elm in self._comments_elm.comment_lst
29 )
30
31 def __len__(self) -> int:
32 """The number of comments in this collection."""

Callers

nothing calls this directly

Calls 1

CommentClass · 0.85

Tested by

no test coverage detected