From 1b9cb54927058edca087227f481280e5c4634c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20M=C3=B6hn?= Date: Thu, 23 Apr 2015 16:38:55 +0900 Subject: [PATCH] Add hint to Diff.__iter__() I'm not the guy who looks at examples in the first place and I guess there are other people like me. When I wanted find out how to get information out of a Diff, I looked at the documented methods and didn't find anything. Only later @cmn showed me the [p for p in diff] example in the documentation. Add a short piece of information that gives a hint to those who prefer the dry API docs. --- docs/diff.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/diff.rst b/docs/diff.rst index 402f6df61..204db2273 100644 --- a/docs/diff.rst +++ b/docs/diff.rst @@ -35,6 +35,10 @@ The Diff type ==================== .. autoattribute:: pygit2.Diff.patch +.. method:: Diff.__iter__() + + Returns an iterator over the deltas/patches in this diff. + .. method:: Diff.__len__() Returns the number of deltas/patches in this diff.