Browse Source

Removed from itertools imports (break under 2to3).

pull/8/head
Jason R. Coombs 14 years ago
parent
commit
15d2e16303
  1. 4
      svg/charts/util.py

4
svg/charts/util.py

@ -1,6 +1,6 @@
#!python #!python
from itertools import chain, repeat, izip import itertools
import datetime import datetime
# from itertools recipes (python documentation) # from itertools recipes (python documentation)
@ -9,7 +9,7 @@ def grouper(n, iterable, padvalue=None):
>>> tuple(grouper(3, 'abcdefg', 'x')) >>> tuple(grouper(3, 'abcdefg', 'x'))
(('a', 'b', 'c'), ('d', 'e', 'f'), ('g', 'x', 'x')) (('a', 'b', 'c'), ('d', 'e', 'f'), ('g', 'x', 'x'))
""" """
return izip(*[chain(iterable, repeat(padvalue, n-1))]*n) return itertools.izip(*[itertools.chain(iterable, itertools.repeat(padvalue, n-1))]*n)
def reverse_mapping(mapping): def reverse_mapping(mapping):
""" """

Loading…
Cancel
Save