Edgewall Software

Changes between Version 11 and Version 12 of HelperFunctions


Ignore:
Timestamp:
Sep 26, 2006, 5:51:04 PM (18 years ago)
Author:
Arnar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HelperFunctions

    v11 v12  
    217217from itertools import groupby
    218218
    219 def countdistinct(iterable, groups=[], key=None):
     219def countdistinct(iterable, groups=None, key=None):
    220220    """Count things.
    221221   
     
    240240    {'buzz': 2}
    241241    """
     242    if groups is None: groups = []
    242243    d = dict([(g, 0) for g in groups])
    243244    for g, l in groupby(iterable, key=key):