diff --git a/README.rst b/README.rst index 61317f68..e5f4f671 100644 --- a/README.rst +++ b/README.rst @@ -18,6 +18,7 @@ What's new? * No more false assumption on `rate_limiting `_, and creation of ``rate_limiting_resettime``. Thank you `edjackson `_ for the pull request * `New `_ parameters ``since`` and ``until`` to ``Repository.get_commits``. Thank you `apetresc `_ for the pull request * `Catch `_ Json parsing exception for some internal server errors, and throw a better exception. Thank you `MarkRoddy `_ for the pull request +* `Allow `_ reversed iteration of ``PaginatedList``s. Thank you `davidbrai `_ for the pull request What's missing? =============== diff --git a/github/PaginatedList.py b/github/PaginatedList.py index f34d1c1f..90afc472 100644 --- a/github/PaginatedList.py +++ b/github/PaginatedList.py @@ -94,6 +94,11 @@ class PaginatedList(PaginatedListBase): second_repo = user.get_repos()[1] first_repos = user.get_repos()[:10] + If you want to iterate in reversed order, just do:: + + for repo in user.get_repos().reversed: + print repo.name + And if you really need it, you can explicitely access a specific page:: some_repos = user.get_repos().get_page(0)