MCPcopy Index your code
hub / github.com/ActiveState/code / range

Function range

recipes/Python/577256_Improved_range_function/recipe-577256.py:4–10  ·  view source on GitHub ↗
(start, stop=None, step=1)

Source from the content-addressed store, hash-verified

2
3# replaces default range function to allow more functionality
4def range(start, stop=None, step=1):
5 if stop==None: stop = start; start = 0
6 x = []
7 while start < stop:
8 x.append(Decimal(str(start)))
9 start += Decimal(str(step))
10 return x

Callers 15

is_primeFunction · 0.85
DurandKernerFunction · 0.85
recipe-577866.pyFile · 0.85
recipe-496882.pyFile · 0.85
factorialFunction · 0.85
findBranchMethod · 0.85
recipe-498121.pyFile · 0.85
recipe-577464.pyFile · 0.85
recipe-135700.pyFile · 0.85
recipe-579106.pyFile · 0.85
recipe-578659.pyFile · 0.85
bytsMethod · 0.85

Calls 2

strFunction · 0.85
appendMethod · 0.45

Tested by 15

test_fsumFunction · 0.68
test_landsburgFunction · 0.68
test_landsburg_condomFunction · 0.68
test_kremerFunction · 0.68
test_commonsenseFunction · 0.68
test_compareFunction · 0.68
test_ascendingMethod · 0.68
test_descendingMethod · 0.68
test_prefixMethod · 0.68
test_pluralMethod · 0.68
test_spreadMethod · 0.68
test_lenMethod · 0.68