original_docstring: 
      Slice an iterator and return a list of lists containing
      those items. Useful if you want to create a div containing
      three div tags that represent columns:
  
      .. sourcecode:: html+jinja
  
          <div class="columwrapper">
            {%- for column in items|slice(3) %}
              <ul class="column-{{ loop.index }}">
              {%- for item in column %}
                <li>{{ item }}</li>
              {%- endfor %}
              </ul>
            {%- endfor %}
          </div>
  
      If you pass it a second argument it's used to fill missing
      values on the last iteration.
  
      *new in Jinja 1.1*
      
docstring: Slice an iterator and return a list of lists containing
  those items. Useful if you want to create a div containing
  three div tags that represent columns.
  
  : html+jinja
  
  
  
  If you pass it a second argument it's used to fill missing
  values on the last iteration.
  
  
docstring_tokens: Slice an iterator and return a list of lists containing those items . Useful if you want to create a div containing three div tags that represent columns . : html + jinja If you pass it a second argument it ' s used to fill missing values on the last iteration .
code: def do_slice(slices, fill_with=None):
      """
      Slice an iterator and return a list of lists containing
      those items. Useful if you want to create a div containing
      three div tags that represent columns:
  
      .. sourcecode:: html+jinja
  
          <div class="columwrapper">
            {%- for column in items|slice(3) %}
              <ul class="column-{{ loop.index }}">
              {%- for item in column %}
                <li>{{ item }}</li>
              {%- endfor %}
              </ul>
            {%- endfor %}
          </div>
  
      If you pass it a second argument it's used to fill missing
      values on the last iteration.
  
      *new in Jinja 1.1*
      """
      def wrapped(env, context, value):
          result = []
          seq = list(value)
          length = len(seq)
          items_per_slice = length // slices
          slices_with_extra = length % slices
          offset = 0
          for slice_number in xrange(slices):
              start = offset + slice_number * items_per_slice
              if slice_number < slices_with_extra:
                  offset += 1
              end = offset + (slice_number + 1) * items_per_slice
              tmp = seq[start:end]
              if fill_with is not None and slice_number >= slices_with_extra:
                  tmp.append(fill_with)
              result.append(tmp)
          return result
      return wrapped
code_tokens: def do_slice ( slices , fill_with = None ) : def wrapped ( env , context , value ) : result = [ ] seq = list ( value ) length = len ( seq ) items_per_slice = length // slices slices_with_extra = length % slices offset = 0 for slice_number in xrange ( slices ) : start = offset + slice_number * items_per_slice if slice_number < slices_with_extra : offset += 1 end = offset + ( slice_number + 1 ) * items_per_slice tmp = seq [ start : end ] if fill_with is not None and slice_number >= slices_with_extra : tmp . append ( fill_with ) result . append ( tmp ) return result return wrapped
short_docstring: Slice an iterator and return a list of lists containing
  those items.
short_docstring_tokens: Slice an iterator and return a list of lists containing those items .
comment: """
      Slice an iterator and return a list of lists containing
      those items. Useful if you want to create a div containing
      three div tags that represent columns:
  
      .. sourcecode:: html+jinja
  
          <div class="columwrapper">
            {%- for column in items|slice(3) %}
              <ul class="column-{{ loop.index }}">
              {%- for item in column %}
                <li>{{ item }}</li>
              {%- endfor %}
              </ul>
            {%- endfor %}
          </div>
  
      If you pass it a second argument it's used to fill missing
      values on the last iteration.
  
      *new in Jinja 1.1*
      """