update from Atlas

This commit is contained in:
Luciano Ramalho committed 2015-04-11 01:05:23 -03:00
1 parent f4cdee2447
commit 7030b56878
61 files changed
+316 -13

No files matched your search

-14
View File
@@ -1,14 +0,0 @@
# BEGIN ARITPROG_ITERTOOLS
import itertools
def aritprog_gen(begin, step, end=None):
if end is not None and begin >= end:
return
yield type(begin + step)(begin)
tail_gen = itertools.count(begin+step, step)
if end is not None:
tail_gen = itertools.takewhile(lambda n: n < end, tail_gen)
for x in tail_gen:
yield x
# END ARITPROG_ITERTOOLS
-13
View File
@@ -1,13 +0,0 @@
# BEGIN ARITPROG_ITERTOOLS
import itertools
def aritprog_gen(begin, step, end=None):
if end is not None and begin >= end:
return
yield type(begin + step)(begin)
tail_gen = itertools.count(begin+step, step)
if end is not None:
tail_gen = itertools.takewhile(lambda n: n < end, tail_gen)
yield from tail_gen
# END ARITPROG_ITERTOOLS