2.4 defines groupby, so there's no need to define our own.

This commit is contained in:
Jeremy Fincher 2005-02-04 05:55:04 +00:00
parent 566b273a97
commit 6580fc535f

View File

@ -27,6 +27,7 @@
# POSSIBILITY OF SUCH DAMAGE.
###
import sys
import new
import random
@ -48,6 +49,7 @@ def trueCycle(iterable):
if not yielded:
raise StopIteration
if sys.version_info < (2, 4, 0):
def groupby(key, iterable):
if key is None:
key = lambda x: x