Opened 16 years ago
Closed 15 years ago
#11596 closed New feature (fixed)
paginator Page should be iterable
| Reported by: | Chris Beaven | Owned by: | Chris Beaven |
|---|---|---|---|
| Component: | Core (Other) | Version: | dev |
| Severity: | Normal | Keywords: | paginate |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description
It's annoying that you can't iterate a PaginatorPage directly. Solution, make it a subclass of list.
Attachments (3)
Change History (8)
by , 16 years ago
| Attachment: | 11596.diff added |
|---|
comment:1 by , 16 years ago
| Keywords: | paginate added |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Summary: | PaginatorPage should subclass list → paginator Page should subclass list |
comment:2 by , 16 years ago
| Summary: | paginator Page should subclass list → paginator Page should be iterable |
|---|---|
| Triage Stage: | Unreviewed → Design decision needed |
by , 15 years ago
| Attachment: | 11596.2.diff added |
|---|
comment:3 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → New feature |
comment:4 by , 15 years ago
| Patch needs improvement: | set |
|---|---|
| Triage Stage: | Design decision needed → Accepted |
I like this idea. However, it seems like collections.Sequence was introduced in Python 2.6, causing this patch to fail when run on Python 2.5.
Note:
See TracTickets
for help on using tickets.
Hrm... maybe it shouldn't subclass list since
object_listmight not actually be a list...It should have
__len__,__contains__and__iter__at least then.