      except TypeError: # value isn't a string or a number; maybe it's a list?
          try:
              if len(value) != 1:
                  return plural_suffix
          except TypeError: # len() of unsized object
              pass
      return singular_suffix
  
  def phone2numeric(value):
      "Takes a phone number and converts it in to its numerical equivalent"
 
</s> remove     except TypeError: # value isn't a string or a number; maybe it's a list?
 </s> add     except TypeError: # Value isn't a string or a number; maybe it's a list? </s> remove     except ValueError: # invalid string that's not a number
 </s> add     except ValueError: # Invalid string that's not a number. </s> remove     "Takes a phone number and converts it in to its numerical equivalent"
 </s> add     """Takes a phone number and converts it in to its numerical equivalent.""" </s> remove     except ValueError: # unpack list of wrong size (no "maybe" value provided)
 </s> add     except ValueError:
        # Unpack list of wrong size (no "maybe" value provided). </s> remove     Format the value like a 'human-readable' file size (i.e. 13 KB, 4.1 MB, 102
    bytes, etc).
 </s> add     Formats the value like a 'human-readable' file size (i.e. 13 KB, 4.1 MB,
    102 bytes, etc).
        except TypeError: # len() of unsized object.
      except TypeError: # value isn't a string or a number; maybe it's a list?
          try:
              if len(value) != 1:
                  return plural_suffix
        except TypeError: # len() of unsized object.
              pass
      return singular_suffix
  
  def phone2numeric(value):
      "Takes a phone number and converts it in to its numerical equivalent"
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/defaultfilters.py