Paginator just implement the __iter__ function
Right now, when you want to iter into all the pages of a Paginator object you to use the page_range function. It would be more logical and naturel to use the normal python of doing that by implementing the iter function like that:
def __iter__(self):
for page_num in self.page_range:
yield self.page(page_num)
Change History
(9)
| Description: |
modified (diff)
|
| Resolution: |
→ wontfix
|
| Status: |
new → closed
|
| Component: |
Uncategorized → Utilities
|
| Easy pickings: |
unset
|
| Has patch: |
set
|
| Needs documentation: |
set
|
| Needs tests: |
set
|
| Resolution: |
wontfix
|
| Severity: |
→ Normal
|
| Status: |
closed → new
|
| Triage Stage: |
Unreviewed → Accepted
|
| Type: |
→ New feature
|
| UI/UX: |
unset
|
| Component: |
Utilities → Core (Other)
|
| Owner: |
changed from nobody to Tanner Stirrat
|
| Status: |
new → assigned
|
| Needs documentation: |
unset
|
| Needs tests: |
unset
|
| Version: |
1.2 → 2.2
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
Reformatted, please use the preview button in the future.