#14218: Paginator just implement the __iter__ function
------------------------------------+---------------------------------------
          Reporter:  mlhamel        |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  Uncategorized  |       Version:  1.2   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by Alex):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Old description:

> 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)

New description:

 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)
 }}}

Comment:

 Reformatted, please use the preview button in the future.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14218#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to