  
  #@register.tag
  def regroup(parser, token):
      """
      Regroup a list of alike objects by a common attribute.
  
      This complex tag is best illustrated by use of an example:  say that
      ``people`` is a list of ``Person`` objects that have ``first_name``,
      ``last_name``, and ``gender`` attributes, and you'd like to display a list
      that looks like:
 
</s> remove     people was not sorted by gender, you'd need to make sure it is sorted before
    using it, i.e.::
 </s> add     people was not sorted by gender, you'd need to make sure it is sorted
    before using it, i.e.:: </s> remove     This is a way to define links that aren't tied to a particular URL configuration::
 </s> add     This is a way to define links that aren't tied to a particular URL
    configuration:: </s> remove     As you can see, the ``if`` tag can take an option ``{% else %}`` clause that
    will be displayed if the test fails.
 </s> add     As you can see, the ``if`` tag can take an option ``{% else %}`` clause
    that will be displayed if the test fails. </s> remove     Loop over each item in an array.
 </s> add     Loops over each item in an array. </s> remove     Returns the value turned into a list. For an integer, it's a list of
    digits. For a string, it's a list of characters.
 </s> add     Returns the value turned into a list.

    For an integer, it's a list of digits.
    For a string, it's a list of characters.
    Regroups a list of alike objects by a common attribute.
  
  #@register.tag
  def regroup(parser, token):
      """
    Regroups a list of alike objects by a common attribute.
  
      This complex tag is best illustrated by use of an example:  say that
      ``people`` is a list of ``Person`` objects that have ``first_name``,
      ``last_name``, and ``gender`` attributes, and you'd like to display a list
      that looks like:
keep keep keep keep replace keep keep keep keep keep
 Style and import fixes.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6641 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/template/defaulttags.py