def iter_pages(self, left_edge=<NUM_LIT:2>, left_current=<NUM_LIT:2>,<EOL>right_current=<NUM_LIT:5>, right_edge=<NUM_LIT:2>):
last = <NUM_LIT:0><EOL>for num in xrange(<NUM_LIT:1>, self.pages + <NUM_LIT:1>):<EOL><INDENT>if num <= left_edge or(num > self.page - left_current - <NUM_LIT:1> and<EOL>num < self.page + right_current) ornum > self.pages - right_edge:<EOL><INDENT>if last + <NUM_LIT:1> != num:<EOL><INDENT>yield None<EOL><DEDENT>yield num<EOL>last = num<EOL><DEDENT><DEDENT>
Iterates over the page numbers in the pagination.  The four
        parameters control the thresholds how many numbers should be produced
        from the sides.  Skipped page numbers are represented as `None`.
        This is how you could render such a pagination in the templates:

        .. sourcecode:: html+jinja

            {% macro render_pagination(pagination, endpoint) %}
              <div class=pagination>
              {%- for page in pagination.iter_pages() %}
                {% if page %}
                  {% if page != pagination.page %}
                    <a href="{{ url_for(endpoint, page=page) }}">{{ page }}</a>
                  {% else %}
                    <strong>{{ page }}</strong>
                  {% endif %}
                {% else %}
                  <span class=ellipsis>…</span>
                {% endif %}
              {%- endfor %}
              </div>
            {% endmacro %}